Skip to main content
Skip to Content
Cresora Commerce
Testing & Sandbox

ACH returns

How ACH returns arrive, and how to handle them asynchronously.

Read state in the debit's response before you treat the debit as submitted: a gateway decline comes back in the 200 response itself, as state: FAILED with a decline_code. A debit the gateway answers as not yet final is recorded as SUBMITTED, the same as an accepted one, so an ACH debit does not come back FAILED with submit_pending; that code appears only on a card transaction, an ACH void and an ACH reversal. A SUBMITTED debit has been accepted, and a return — if there is one — arrives later as a separate event.

⚠Warning

The amount's cents do not select a return code. Cresora boards sandbox merchants onto the VeriCheck sandbox, not the gateway's loopback simulator, and there is no documented way to trigger a specific return on demand through the Cresora API today. Build your handling against the transaction.returned webhook below.

Returns are asynchronous

A SUBMITTED response tells you the entry was accepted, not that it was paid:

POST debit      -> 200, state: SUBMITTED
(bank processing)
return arrives  -> state: RETURNED + transaction.returned webhook

In production a return typically lands 1–3 banking days after submission. Do not build a test that depends on a particular sandbox delay — poll for the state change or wait on the webhook.

⚠Warning

Do not treat SUBMITTED as success in your reconciliation, your fulfilment trigger, or your UI. Funds are not guaranteed until the return window has passed.

The return webhook

transaction.returned is delivered in the standard envelope:

{
  "envelope_version": 1,
  "event_id": "0190a1e6-7081-7c9d-8e0f-3a4b5c6d7e8f",
  "event_type": "transaction.returned",
  "occurred_at": "2026-08-12T14:32:09Z",
  "partner_id": "0190a190-2b3c-7d4e-8f50-6a7b8c9d0e1f",
  "idempotency_key": "evt_0190a1e6-7081-7c9d-8e0f-3a4b5c6d7e8f",
  "data": {
    "transactionId": "0190a1e5-1111-7abc-8def-2a3b4c5d6e7f",
    "merchantId": "0190a1c0-4d5e-7f60-8a71-b2c3d4e5f607",
    "partnerId": "0190a190-2b3c-7d4e-8f50-6a7b8c9d0e1f",
    "amount": 100.0,
    "returnCode": "R01",
    "returnDescription": "Insufficient funds",
    "retryable": true,
    "stopsRecurring": false,
    "auditLevel": "NORMAL",
    "parentContractId": null,
    "returnedAt": "2026-08-11T21:05:12Z"
  }
}

The sample is abridged: data carries more fields.

The transaction itself moves to state: RETURNED — confirm with GET /transactions/{transactionId} if you poll instead of consuming the webhook. (data carries the event's own fields, camelCase; the R-code is returnCode, not a decline_code.)

Handling rules:

  • Branch on event_type, never on payload shape.
  • idempotency_key is your dedup key — it is evt_ + the event_id (which is a bare UUID). Store it and ignore a repeat.
  • envelope_version is 1. Treat an unknown version as unprocessable rather than guessing.

A decline that carries a return code

The gateway documents that the receiving bank accepts an ACH entry and can return it afterward, which is the path the rest of this page describes. Its loopback simulator behaves differently: it answers a debit at once with a decline that carries a return code. Cresora does not board merchants onto that simulator (a sandbox merchant is boarded onto the VeriCheck sandbox), so an integration against a Cresora merchant is not expected to meet it.

If the gateway does decline a debit with a return code, the debit is FAILED with decline_code: ach_returned. The transaction.failed event for it carries the return: its declineCode is ach_returned, and returnCode, returnDescription, retryable, stopsRecurring and auditLevel are the same fields transaction.returned carries. They are in the payload from schemaVersion 7 and are null on every other decline. decline_code alone does not say which return it was, so read returnCode from the event; the R10 rule below applies to it too.

R10 is terminal

🔒Compliance

R10 means the customer told their bank the debit was unauthorized. Stop retrying that account: NACHA does not permit re-presenting an entry returned as unauthorized. Resolve it with the customer and obtain a fresh authorization before debiting again.

R02, R03, R04, R16 and R20 all say the account itself cannot be debited — closed, missing, mistyped, frozen, or not a transaction account. A new debit of the same saved account comes back the same way: have the payer save a corrected or different account through a hosted payment page, and debit that one. A merchant-initiated debit of the new account needs an authorization the payer gives for it: its consent_at cannot predate the new save, beyond a short tolerance.

The full ACH contract, including authorization and consent requirements, is in the ACH guide.