Transaction Lifecycle
The 16 transaction states, how payments move between them, and the webhook fired at each step.
Every payment in Cresora follows a deterministic state machine. State values are UPPERCASE on the wire — state: "CAPTURED", never lower-case.
The happy paths
Card sale: INITIATED → CAPTURED → SETTLED
Card auth-only: INITIATED → AUTHORIZED → (your capture) → CAPTURED → SETTLED
ACH debit: INITIATED → SUBMITTED → SETTLED (or → RETURNED with an R-code)All 16 states
| State | Meaning |
|---|---|
INITIATED | Transaction created; no gateway outcome yet |
THREE_DS_PENDING | A 3-D Secure challenge is outstanding — three_ds.challenge_url is populated, 15-minute TTL. Reserved card-authentication flows only; no current POST /transactions create path issues a step-up |
THREE_DS_FAILED | The challenge failed, was abandoned, or timed out — see three_ds_failure_reason |
AUTHORIZED | Funds held on the card, not yet captured. Reached via an auth-only hosted-page session (capture_mode: authorize) |
CAPTURED | Funds captured; awaiting the settlement batch |
SUBMITTED | ACH: accepted into the ODFI origination batch — clears 1–3 banking days later. Acceptance is not presentment: an ACH_VOID can cancel the debit until the gateway puts the entry in its bank file. The state does not change when it does; after that the void is refused (422 gateway_operation_not_allowed_in_state) with nothing recorded, and the debit can be refunded once it is SETTLED (see ACH refunds) |
SETTLED | The gateway reported the transaction settled — a provisional signal, not a deposit. The gate for refunds |
VOIDED | Cancelled pre-settlement: a card VOID, or an ACH_VOID of a SUBMITTED debit. The VOID or ACH_VOID transaction itself also reads VOIDED |
REVERSED | Reversed via a full AUTH_REVERSAL of an AUTHORIZED or CAPTURED card payment (a partial one is accepted only on an AUTHORIZED payment, which stays AUTHORIZED), or a merchant-initiated NACHA reversal (ACH; not available today). The reversal transaction itself also reads REVERSED, full or partial (AUTH_REVERSAL or PARTIAL_AUTH_REVERSAL) |
RETURNED | Terminal: the receiving bank returned the ACH entry with an R-code — reached from SUBMITTED or SETTLED; a transaction.returned webhook fires |
REFUNDED | Fully refunded (cumulative refunds reached the original amount) |
PARTIALLY_REFUNDED | Some but not all of the amount refunded — re-entrant across multiple partial refunds |
FAILED | Declined or failed — discriminate on decline_code |
DISPUTED | Reserved. No transaction reaches it today, because Cresora receives no disputes |
CHARGED_BACK | Reserved, for the same reason |
VERIFIED | Reserved. A CARD_VERIFICATION ($0 verification) returns 501 today, so no transaction reaches it |
Two names you may see in older material are not states: requires_action (the real 3DS-pending state is THREE_DS_PENDING) and ach_returned. A return the bank sends for a debit that is SUBMITTED or SETTLED moves it to RETURNED; ach_returned is a decline_code, carried by a FAILED ACH debit that the gateway declined with a return code in its answer, which it documents for its loopback simulator (see ACH returns).
Webhook events
| What happened | Event |
|---|---|
| Sale captured | transaction.captured |
| Auth-only hold placed | transaction.authorized |
| Declined / failed | transaction.failed |
| Settled | transaction.settled |
| Card voided | transaction.voided |
| ACH debit voided | transaction.ach_voided |
| Authorization reversed | transaction.auth_reversed |
| Surcharge reversed, after a void, full reversal or refund of a surcharged card payment (not, today, a refund that names the capture row) | transaction.surcharge_reversed |
| Card refund succeeded, full or partial / ACH refund originated | transaction.refunded / transaction.refund_issued |
| ACH accepted into the batch | transaction.ach_submitted |
| ACH processor settlement status changed | transaction.ach_status_changed |
| ACH returned by the bank | transaction.returned |
transaction.ach_reversal_submitted is not emitted today: ACH_REVERSAL is not available, and the type is reserved.
A void or reversal is its own transaction, with its own id, linked to the original by
parent_transaction_id on the API. transaction.voided, transaction.ach_voided and
transaction.auth_reversed are raised for that transaction, not for the original. After a full void or reversal, the original also moves to
VOIDED or REVERSED, without an event of its own for that move. For a payment authorized
first and captured later with a CAPTURE or PARTIAL_CAPTURE, the authorization and its capture
row both move, whichever of the two the void or reversal named, unless the other row has
already left CAPTURED. If the payment carried a
surcharge, transaction.surcharge_reversed can follow later. It names the sale or the
authorization, also when the void or reversal named the CAPTURE or PARTIAL_CAPTURE row. A
partial auth reversal raises
transaction.auth_reversed too, and the original stays AUTHORIZED, holding the amount that
was not reversed. That remainder cannot be captured today; send an AUTH_REVERSAL with no
amount to release it.
This page does not say for which of these webhooks delivery to a partner endpoint on sandbox has been confirmed; Webhook event types names those.
Disputes raise no event today. The gateway does not report them: a cardholder raises a dispute with their issuer, and it is worked through the acquirer or processor.
Webhooks are how you learn that a payment changed: react to them, and read the transaction when you need its current state. Polling GET /api/v1/transactions/{transactionId} is the sanctioned fallback for gaps (missed deliveries, reconciliation), not the main loop. Settlement is the exception: transaction.settled is provisional, so build on the batch's state and, for one transaction, on its settlement object (returned to a caller holding settlement:read), not on that event alone (see Settlements).
Retries and state guards
Replay safety is provided by the Idempotency-Key header (24 hours, X-Idempotent-Replay: true on the cached response) — not by the state machine. A new CAPTURE (fresh key) against an authorization that is no longer AUTHORIZED, such as one already captured or settled, is refused with 422 parent_not_authorized; it does not echo the existing object. Other operations have their own state guards (transaction_already_settled, parent_not_voidable_in_state, …). Retry with the same key; don't re-issue operations with new keys expecting a no-op.