Skip to main content
Skip to Content
Cresora Commerce
Core Concepts

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

StateMeaning
INITIATEDTransaction created; no gateway outcome yet
THREE_DS_PENDINGA 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_FAILEDThe challenge failed, was abandoned, or timed out — see three_ds_failure_reason
AUTHORIZEDFunds held on the card, not yet captured. Reached via an auth-only hosted-page session (capture_mode: authorize)
CAPTUREDFunds captured; awaiting the settlement batch
SUBMITTEDACH: 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)
SETTLEDThe gateway reported the transaction settled — a provisional signal, not a deposit. The gate for refunds
VOIDEDCancelled pre-settlement: a card VOID, or an ACH_VOID of a SUBMITTED debit. The VOID or ACH_VOID transaction itself also reads VOIDED
REVERSEDReversed 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)
RETURNEDTerminal: the receiving bank returned the ACH entry with an R-code — reached from SUBMITTED or SETTLED; a transaction.returned webhook fires
REFUNDEDFully refunded (cumulative refunds reached the original amount)
PARTIALLY_REFUNDEDSome but not all of the amount refunded — re-entrant across multiple partial refunds
FAILEDDeclined or failed — discriminate on decline_code
DISPUTEDReserved. No transaction reaches it today, because Cresora receives no disputes
CHARGED_BACKReserved, for the same reason
VERIFIEDReserved. 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 happenedEvent
Sale capturedtransaction.captured
Auth-only hold placedtransaction.authorized
Declined / failedtransaction.failed
Settledtransaction.settled
Card voidedtransaction.voided
ACH debit voidedtransaction.ach_voided
Authorization reversedtransaction.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 originatedtransaction.refunded / transaction.refund_issued
ACH accepted into the batchtransaction.ach_submitted
ACH processor settlement status changedtransaction.ach_status_changed
ACH returned by the banktransaction.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.

💡Tip

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.