Credit/refund a transaction
Refunds or credits a prior transaction. Send amount_cents for a partial
refund; omit it to refund the full amount. Partial refunds accumulate in the
source transaction’s credited_amount_cents. Creates a refund/
general_credit transaction linked via parent_transaction_id and returns it
with 201. Pass an Idempotency-Key header to make retries safe. Returns
404 when the transaction is not found, 409 on an in-flight duplicate key,
and 422 when the requested amount exceeds the refundable balance or the
transaction cannot be refunded.
Authorizations
API key (fp_live_/fp_test_) or JWT bearer token
Headers
Optional client-generated key (UUID recommended) used to deduplicate
retries. The first request with a given key executes normally; a retry
with the same key replays that first response with
X-Idempotent-Replayed: true for up to 24 hours. A concurrent retry
while the first request is still in flight returns 409.
The response cache is keyed on the authenticated merchant and this key ONLY — not on the operation, path, or request body. Use a fresh, unique key per logical request: reusing one key across different operations (for example a purchase and then a capture) replays the first operation's cached status and body instead of performing the second.
255Path Parameters
Transaction slug (transaction to refund)