Skip to main content
Skip to Content
Cresora Commerce
Transaction Types

Card Transactions

Card payment types, auth-only via the hosted page, and state transitions.

Card payments in Cresora charge a saved card referenced by its vault token (cvt_…) — see API Direct for the charging surface. Whether a payment captures immediately or authorizes for a later capture is decided when the card is charged on the hosted page, not by a field on POST /transactions.

Immediate capture (sale)

The default. The hosted-page session is created with capture_mode: sale (or the mode omitted), and a direct SALE on a vault token authorizes and captures in one step. Use this for most e-commerce flows.

State path: INITIATED → CAPTURED → SETTLED (SUBMITTED is the ACH in-flight state and never appears on the card rail — see Transaction lifecycle)

Auth-only (authorize now, capture later)

Authorize the card to hold funds, then capture later. Use this for:

  • Hotel and rental holds
  • Marketplace settlements after service delivery
  • Order fulfillment with uncertain timing

Auth-only is available on the hosted-page rail: create the session with "capture_mode": "authorize" (see the HPP guide). When the payer pays by card, the completed session materialises an AUTHORIZED transaction you capture through the normal capture call below. type: "AUTHORIZATION" on POST /transactions returns 501 — reserved until the vault-token authorize wire shape is vendor-confirmed.

State path: AUTHORIZED → (your capture call) → CAPTURED → SETTLED

There is no Cresora capture deadline

Cresora does not expire authorizations on a timer and does not sweep them. The hold's lifetime belongs to the issuer, and you discover it lazily: a capture against a hold the issuer has already released is refused by the gateway; Cresora has no "expired" state or flag, so read the error or decline_code the capture returns. Plan around your issuer's window, not around a platform one.

Capture

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": "CAPTURE",
    "merchant_id": "0190a1b2-c3d4-7e5f-8901-23456789abcd",
    "parent_transaction_id": "0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f"
  }'

CAPTURE takes the parent's full authorized value — an amount in the body is ignored. Partial capture is not available yet: a PARTIAL_CAPTURE request returns 503 feature_disabled, which is not retryable.

Cancelling before settlement: VOID vs AUTH_REVERSAL

Two distinct types — you choose which by the type you send. At the gateway both send the same reversal; they differ in what they accept and record:

VOIDAUTH_REVERSAL
What it isThe same reversal as a full AUTH_REVERSAL, sent without an amountA reversal of all or part of the authorization
Valid againstAUTHORIZED, or CAPTURED but not yet SETTLEDAUTHORIZED or CAPTURED, pre-settlement
Parent afterwardsVOIDED; transaction.voided firesREVERSED on a full reversal, still AUTHORIZED on a partial one; transaction.auth_reversed fires
amountIgnored (lifted from the parent)Omit for a full reversal; send one for a partial reversal of an AUTHORIZED parent (processor-gated). On a CAPTURED parent a partial reversal is refused with partial_reversal_parent_not_authorized
{ "type": "VOID", "merchant_id": "…", "parent_transaction_id": "…" }
{ "type": "AUTH_REVERSAL", "merchant_id": "…", "parent_transaction_id": "…" }

Voidability is gated by "settled at processor", not by a wall-clock window — once the parent is SETTLED, the only remaining operation is a refund. To cancel part of an authorization, use AUTH_REVERSAL; the remainder then cannot be captured today. To cancel the whole payment, either type sends the same reversal, and when the issuer releases the hold is up to the issuer. A card charge collected by a recurring contract is the exception: an AUTH_REVERSAL on it is always refused, and a VOID on it is refused today with 503 feature_disabled.

A partial reversal (amount present, strictly less than the remaining authorized amount) leaves the parent AUTHORIZED for the remainder and records a PARTIAL_AUTH_REVERSAL child. Support is processor-dependent — an unsupported processor declines through the normal decline_code surface.

Refunds

A refund is valid once the parent is SETTLED — before settlement, cancel with VOID/AUTH_REVERSAL instead:

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"
  }'

This refunds the full settled amount (amount is ignored — the platform derives the remainder). For a partial refund, use type: "PARTIAL_REFUND" with an amount; multiple partial refunds can be issued until the full amount is refunded.

State transition on full refund: SETTLED → REFUNDED (partials pass through PARTIALLY_REFUNDED). See Refunds for reason codes and the response shape.