Skip to main content
Skip to Content
Cresora Commerce
Transaction Types

Refunds

Full and partial refunds for card and ACH payments.

A refund returns funds to a customer after a payment has settled. Before settlement, cancel instead: VOID or AUTH_REVERSAL for a card payment (see Auth Reversal vs. Void), or ACH_VOID for an ACH debit while it is SUBMITTED (see ACH refunds below). For a card payment, the cutoff is the parent reaching SETTLED, not a wall-clock window.

A card charge collected by a recurring contract cannot be refunded today: a REFUND or PARTIAL_REFUND on it is refused with 503 feature_disabled, which is not retryable. A recurring-contract debit whose type reads ACH_DEBIT is refunded with ACH_REFUND, like any other ACH debit (see ACH refunds below).

ℹNote

If the gateway declines a refund on sandbox, contact support with the transaction id before you retry it: some sandbox merchants boarded before refunds were enabled at the gateway still have refunds turned off there.

Card refunds

Full refund
curl -X POST https://api.cresoracommerce.ai/api/v1/transactions \
  -H "Authorization: Bearer csk_ab12cd34_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: idem_$(uuidgen)" \
  -d '{ "type": "REFUND", "merchant_id": "0190a1b2-c3d4-7e5f-8901-23456789abcd", "parent_transaction_id": "0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f", "refund_reason": "customer_requested" }'
Partial refund
curl -X POST https://api.cresoracommerce.ai/api/v1/transactions \
  -H "Authorization: Bearer csk_ab12cd34_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: idem_$(uuidgen)" \
  -d '{ "type": "PARTIAL_REFUND", "merchant_id": "0190a1b2-c3d4-7e5f-8901-23456789abcd", "parent_transaction_id": "0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f", "amount": "50.00", "refund_reason": "customer_requested" }'

refund_reason is required and structured: overpayment, service_not_rendered, insurance_adjustment, customer_requested, or other_with_note (pair the last with a refund_note, max 280 characters). A refund_note that holds what looks like a card number, meaning 13 to 19 digits in a row or in the usual groups separated by spaces, dashes or dots, is refused with 400 validation_error. That includes a long reference such as an ACH trace number, so leave it out of the note.

Refund rules

RuleDetail
Parent stateA card payment must be SETTLED or PARTIALLY_REFUNDED (a partly refunded payment takes a further PARTIAL_REFUND, or a REFUND of the remainder); a REFUNDED payment is rejected. An ACH debit must be SETTLED and stays SETTLED through its refunds; a reversed debit is rejected. Before settlement, use VOID or AUTH_REVERSAL for a card payment, or ACH_VOID for an ACH debit. Refunds on one payment can total at most its amount: a refund past that is refused with 422 refund_exceeds_remaining for a card payment, or 422 ach_refund_exceeds_remaining for an ACH debit (both retryable: false)
Full refund (REFUND)amount is ignored — the platform derives parent amount − cumulative refunds
Partial refund (PARTIAL_REFUND)amount required, up to the remaining refundable capacity
Multiple partialsAllowed until cumulative equals the original amount
A refund is still pendingWhile an earlier refund on the same payment is INITIATED — Cresora does not yet know the gateway's answer — a new REFUND, PARTIAL_REFUND or ACH_REFUND on it is refused with 422 refund_pending_on_parent, which is retryable. Cresora usually resolves the earlier refund on its own; if it is still pending after a long wait, contact support with the transaction id. Meanwhile refundable_balance.remaining is 0 and available_actions offers no refund
Settlement timingCresora records the refund when the gateway approves it. When the credit reaches the cardholder is up to the issuer

When a refund is refused or unclear

  • The gateway refuses the operation outright. The request is refused with 422 gateway_operation_not_allowed_in_state (retryable: false) and nothing is recorded, so there is no transaction to read. Do not send the same request again: read the parent payment's state, and contact support if it still looks refundable.
  • The gateway's answer is unknown. The request answers 502 gateway_outcome_unknown. Retry with the same Idempotency-Key, never a new one. The refund is recorded as INITIATED and Cresora reconciles it: a retry with the same key returns that row, and a second refund on the payment is refused until it resolves (see "A refund is still pending" above).

Suspended or closed merchants

A refund, void or reversal — REFUND, PARTIAL_REFUND, VOID, AUTH_REVERSAL, ACH_VOID and ACH_REFUND — is accepted on a SUSPENDED or CLOSED merchant, so money taken before the suspension or close can still be returned. A CLOSED merchant can no longer be read (its GET answers 404), but its merchant_id is still accepted here. The request is still refused with 422 merchant_gateway_unprovisioned if the merchant has no gateway account.

Cresora refuses a new charge or a capture request on such a merchant: 422 merchant_not_chargeable on a suspended one, 404 merchant_not_found on a closed one.

How the gateway treats the operation on a merchant it no longer holds as live is not yet confirmed. It may refuse it, and you then get its refusal like any other refused refund. An approval is not yet confirmed to move money either, so check with Cresora before you tell the customer the money is back.

Refund response

The refund is a transaction — there is no separate refund resource, no ref_ id, and no refund-specific status: a refund has the state of its own transaction. When Cresora does not yet know the gateway's answer, that transaction stays INITIATED until Cresora resolves it (see Refund rules). The response is a normal transaction object: an id (UUID; the create response also carries it under the older name transaction_id, which is deprecated with removal planned for 2027-03), type: REFUND, PARTIAL_REFUND or ACH_REFUND, its own state and the amount. It does not repeat parent_transaction_id: keep the id of the payment you refunded, or read the link from GET /api/v1/transactions/{transactionId}, which returns it.

Refund response (abridged)
{
  "id": "01920c44-9a1d-7b02-8c5e-2f6a7b8c9d0e",
  "transaction_id": "01920c44-9a1d-7b02-8c5e-2f6a7b8c9d0e",
  "merchant_id": "0190a1b2-c3d4-7e5f-8901-23456789abcd",
  "type": "REFUND",
  "state": "REFUNDED",
  "amount": "50.00",
  "currency": "USD",
  "surcharge_amount": "0.00",
  "convenience_fee_amount": "0.00",
  "surcharge_reversed_amount": null,
  "created_at": "2026-10-16T14:03:07Z"
}

The fee fields are the refund's own and read 0.00. A surcharge the gateway reverses is never recorded on the refund: when Cresora records it, it is on the payment you refunded, as its surcharge_reversed_amount. A refund that names the CAPTURE or PARTIAL_CAPTURE row of a payment authorized first and captured later records it nowhere today, because that row carries no surcharge (see Fees on a refunded payment).

For a card payment, the parent is where refund progress lives: it transitions to PARTIALLY_REFUNDED (re-entrant across multiple partials) and to REFUNDED once cumulative refunds equal the original amount. Track the parent's state for whether refunds have started or completed. refundable_balance.remaining says how much is still refundable, on either rail. An ACH debit stays SETTLED throughout.

Fees on a refunded payment

  • Surcharge: after a refund, void or authorization reversal of a surcharged card payment, the gateway reverses its share of the surcharge. This is the gateway's own description of how it works; it has not yet been observed on every path. For a refund, Cresora usually reads the reversal back only once the refund has settled (once every refund on the payment has settled, if there are several), so it can lag the refund. The surcharge_reversed_amount of the sale or authorization records the cumulative amount once it has been read back, and is null until then; a void or reversal that names the CAPTURE or PARTIAL_CAPTURE row is recorded on the authorization that row captured. It is not recorded in every case: for example, not when a partial authorization reversal is made, which leaves the parent AUTHORIZED, and, today, not for a refund that names a CAPTURE or PARTIAL_CAPTURE row, so do not rely on transaction.surcharge_reversed alone. See the Surcharging Guide.
  • Convenience fee: a full refund is expected to return the payment and the convenience fee, but this is not yet confirmed with the gateway, so do not promise it. A partial refund returns part of the payment amount only; the fee is not refunded. Whether a partial refund should return a share of the fee is under legal review. See Amounts, receipts and refunds.

ACH refunds

For ACH payments, a refund creates a new credit ACH entry — it doesn't reverse the original debit. Cresora receives no event when the credit clears; when it reaches the customer is up to the customer's bank.

By default, an ACH refund must be issued within 60 days after the debit settles; after that it is rejected with 422 ach_refund_window_expired, which is not retryable. A refund needs a settled debit. While the debit is SUBMITTED, cancel it with ACH_VOID. If the void is refused with 422 gateway_operation_not_allowed_in_state, or ends FAILED, the entry has already gone out and the debit stays SUBMITTED: wait until it is SETTLED, then refund it. One exception: an ACH_VOID whose outcome is unknown — 502 gateway_outcome_unknown, 502 gateway_unavailable or 504 gateway_timeout — records nothing, yet the gateway may still have voided the debit, which keeps reading SUBMITTED. So retry it only with the same Idempotency-Key: a new key can reverse the debit twice. If that same-key retry is refused with 422 gateway_operation_not_allowed_in_state, the first void may have gone through: do not refund the debit, and contact Cresora with the error_id. A debit that comes back RETURNED, before or after it settles, has nothing to refund.

curl -X POST https://api.cresoracommerce.ai/api/v1/transactions \
  -H "Authorization: Bearer csk_ab12cd34_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: idem_$(uuidgen)" \
  -d '{ "type": "ACH_REFUND", "merchant_id": "0190a1b2-c3d4-7e5f-8901-23456789abcd", "parent_transaction_id": "0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f", "refund_reason": "customer_requested" }'
ℹNote

ACH_REVERSAL, NACHA's correction for an erroneous ACH entry, is not available today: the gateway does not accept a reversal of a settled debit, so do not send one. To correct an erroneous debit — a wrong amount, a wrong account or a duplicate — refund it as above, with refund_reason overpayment, or other_with_note with a refund_note; for a debit taken for too much, refund only the excess. If you already sent an ACH_REVERSAL and it answered 502 or 504, read ACH reversal before you refund.

Webhook events

EventWhen
transaction.refund_issuedAn ACH refund is originated. Its transactionId is the refund; parentTransactionId is the debit it refunds. A card refund does not send it, and no event follows when the refund credit clears
transaction.refundedA card refund succeeds, full or partial. Its transactionId is the original transaction; refundTransactionId is the refund
transaction.returnedThe receiving bank returns an ACH refund's credit, as it can return a debit. Its transactionId is the refund (the transactionId of its transaction.refund_issued), not the debit, and it carries no parentTransactionId
transaction.failedRefund fails. The event carries the failed transaction's type, so a failed refund is distinguishable from a failed sale.