Skip to main content
Cresora Commerce

Transactions

Process card sales, refunds, voids, authorizations and captures. Batch close operations for settlement timing.

ℹServer-to-server API
Run the examples on this page from your backend against the sandbox host. The API sends no CORS headers, so browser JavaScript cannot read its responses, and an API key must never be exposed in a browser. There is no interactive console here. Generating a client instead? Download the OpenAPI spec (YAML).
GET/transactions

Authorization

BearerAuth
AuthorizationBearer <token>

Cresora API key, sent as an opaque bearer token in the Authorization header. Format:

csk_<prefix>_<random>
  • <prefix> — 8 URL-safe chars, shown in UI and logs for identification without revealing the full key (e.g. csk_Ab3kX9mQ…). Use ApiKey.prefix to match.
  • <random> — 24+ cryptographically random URL-safe chars.

Obtain via Partner Portal → Settings → API keys. Keys are only shown in full at creation/rotation time — Cresora does not retain the full value in retrievable form. Rotate any key that may have been exposed via logs, client code, or source control.

In: header

Query Parameters

cursor?string

Opaque pagination cursor from previous response. Do not parse.

Lengthlength <= 256
page_size?integer

Items per page (1–100).

Range1 <= value <= 100
Default25
merchant_id?string
Formatuuid
q?string

Free-text search over opaque identifiers, trimmed before matching: case-insensitive substring on gateway_transaction_id; exact match on the transaction id or merchant_id when the value parses as a UUID; exact match on the ACH routing_number_last4 or account_number_last4 when the value is exactly 4 digits. Amount, state and type are not searched — use their dedicated parameters.

Lengthlength <= 200
state?string

Transaction lifecycle state. Maps to domain TransactionState. Aligned with implementation at T-3.10 (3DS2 authentication).

  • INITIATED — created, not yet submitted to gateway
  • THREE_DS_PENDING — a 3DS challenge is outstanding, waiting for the customer to complete. The three_ds projection carries challenge_url; the customer browser is redirected there and the ISV then calls POST /transactions/{id}/three-ds/complete to resolve the transaction. 15-minute TTL; on timeout / abandonment the server-side sweep promotes the row to THREE_DS_FAILED with three_ds_failure_reason = callback_timeout. Also listen for the three_ds.completed webhook for an eventually-consistent ack path. No current POST /transactions create path issues a step-up — the saved-card SALE charges an already-authenticated vault credential; this state and the completion endpoint are retained for reserved card-authentication flows.
  • THREE_DS_FAILED — terminal 3DS authentication failure. The three_ds_failure_reason field carries one of: challenge_failed, challenge_abandoned, callback_timeout, signature_invalid, unsupported_card, issuer_declined. The transaction is not authorized — no funds are held. Distinct from the generic FAILED state so chargeback / retry logic can dispatch on the 3DS-specific cause.
  • AUTHORIZED — funds held, not yet captured
  • CAPTURED — capture submitted, awaiting settlement
  • SUBMITTED — ACH entry accepted into the ODFI origination batch (T-4.2). Distinct from CAPTURED because card-rail void / refund / auth-reverse rules don't map onto ACH semantics. Clearing happens 1-3 banking days later via the settlement webhook (SUBMITTED → SETTLED on cleared; a NACHA return drives SUBMITTED → RETURNED / SETTLED → RETURNED with an R-code — see the transaction.returned webhook).
  • SETTLED — funds moved into the merchant batch (end of day)
  • RETURNED — terminal: the ACH entry came back with a NACHA R-code, from SUBMITTED or SETTLED
  • VOIDED — cancelled pre-settlement
  • REFUNDED — fully refunded post-settlement (cumulative refund equals original amount)
  • PARTIALLY_REFUNDED — one or more partial refunds issued, remaining refundable capacity > 0. Re-entrant: additional partial refunds are accepted until cumulative == original amount, at which point the state advances to REFUNDED.
  • REVERSED — authorization released (card) or NACHA reversal (ACH)
  • FAILED — terminal failure state; see decline_code for cause (covers both 3DS-specific and non-3DS failures)
  • DISPUTED — chargeback opened against a SETTLED transaction (Sprint 7 dispute lifecycle); evidence-gathering window open.
  • CHARGED_BACK — chargeback lost / resolved against the merchant.
  • VERIFIED — terminal state for CARD_VERIFICATION ($0 auth). No auth hold, no settlement, no auth-reverse / void semantics apply. Inspect avs_response_code + cv_response_code for the verification outcome.

Value in

  • "INITIATED"
  • "THREE_DS_PENDING"
  • "THREE_DS_FAILED"
  • "AUTHORIZED"
  • "CAPTURED"
  • "SUBMITTED"
  • "SETTLED"
  • "VOIDED"
  • "REFUNDED"
  • "PARTIALLY_REFUNDED"
  • "REVERSED"
  • "RETURNED"
  • "FAILED"
  • "DISPUTED"
  • "CHARGED_BACK"
  • "VERIFIED"
type?string

Transaction type. Maps 1:1 to the domain TransactionType enum.

Value in

  • "AUTHORIZATION"
  • "SALE"
  • "CAPTURE"
  • "PARTIAL_CAPTURE"
  • "CAPTURE_ALL"
  • "AUTH_REVERSAL"
  • "PARTIAL_AUTH_REVERSAL"
  • "VOID"
  • "REFUND"
  • "PARTIAL_REFUND"
  • "CARD_VERIFICATION"
  • "SURCHARGE"
  • "ACH_DEBIT"
  • "ACH_REFUND"
  • "ACH_REVERSAL"
  • "ACH_VOID"
  • "ACH_RETURN"
  • "RECURRING_CREATE"
  • "RECURRING_UPDATE"
  • "RECURRING_CANCEL"
  • "RECURRING_RETRY"
  • "RECURRING_PAUSE"
  • "RECURRING_RESUME"
  • "RECURRING_COMPLETION"
  • "REPEAT_SALE"
  • "ADJUSTMENT"
  • "BATCH_CLOSE"
rail?string

Value in

  • "ACH"
  • "CARD"
from?string

Inclusive ISO-8601 lower bound on created_at.

Formatdate-time
to?string

Inclusive ISO-8601 upper bound on created_at.

Formatdate-time
amount_min?string

Inclusive lower bound on amount (dollars).

amount_max?string

Inclusive upper bound on amount (dollars).

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/transactions"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",      "merchant_name": "string",      "type": "AUTHORIZATION",      "rail": "CARD",      "amount": 0,      "currency": "USD",      "state": "INITIATED",      "approval_code": "string",      "decline_code": "insufficient_funds",      "decline_reason": "string",      "card_last4": "string",      "routing_last4": "string",      "account_last4": "string",      "account_type": "CHECKING",      "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "pagination": {    "next_cursor": "string",    "has_more": true,    "total_count": 0  }}
POST/transactions

Authorization

BearerAuth
AuthorizationBearer <token>

Cresora API key, sent as an opaque bearer token in the Authorization header. Format:

csk_<prefix>_<random>
  • <prefix> — 8 URL-safe chars, shown in UI and logs for identification without revealing the full key (e.g. csk_Ab3kX9mQ…). Use ApiKey.prefix to match.
  • <random> — 24+ cryptographically random URL-safe chars.

Obtain via Partner Portal → Settings → API keys. Keys are only shown in full at creation/rotation time — Cresora does not retain the full value in retrievable form. Rotate any key that may have been exposed via logs, client code, or source control.

In: header

Header Parameters

Idempotency-Key*string

Client-generated unique key — a UUIDv4 is the recommended form. Cresora deduplicates within a 24-hour window scoped to the partner.

Format: 1–128 characters of letters, digits, . _ : -. Anything else is rejected with 400 validation_error. The character set is narrower than base64: padded base64 (+ / =) is NOT accepted, base64url is. The key is forwarded verbatim to the payment gateway on transaction creates, so it must satisfy the gateway's key contract too — rejecting locally gives you an actionable error instead of an opaque upstream failure mid-request.

Reserved prefixes — rejected with 400 idempotency_key_reserved:

  • hpp:, recurring: — Cresora's own server-minted deterministic keys. A client key in these namespaces could collide with a platform-generated record.
  • rb:, inv-charge:, inv-installment: — reserved by the payment gateway for its internally-minted keys.

Replay semantics:

  • Same key + same request body → Cresora returns the cached response from the original call. Response includes header X-Idempotent-Replay: true so the client can distinguish replays from fresh executions. Status code, body and side effects are identical to the original call.
  • Same key + different body → 422 idempotency_key_reused. Generate a new key and retry, or re-send the original body.
  • Key older than 24 hours → treated as a fresh key; no replay guarantee from beyond the window.

Retrying after an indeterminate failure. On 502 gateway_outcome_unknown the transaction is recorded as pending and the outcome is not yet known — retry with the SAME key (a fresh key risks a double charge) or poll the transaction. This is also what a gateway-side "an earlier request with this key is still in flight" response surfaces as.

Do NOT reuse keys across different partners. Scope is enforced per partner_id so the same key in partner A and partner B is independent.

Match^[A-Za-z0-9._:\-]+$
Length1 <= length <= 128

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Polymorphic request body for POST /transactions, discriminated on type. The wire format is one flat JSON object (mirrors the gateway's POST /api/transactions); the variants below pin per-operation required fields so generated SDKs stay typed.

AUTHORIZATION and CARD_VERIFICATION on card are reserved and currently return 501 — the only card instrument is a Cresora vault token (cvt_, delivered by an HPP save-card flow), and the gateway wire shapes for a vault-token authorize / $0-verify are not yet vendor-confirmed. They carry no request variant until then.

Authorize + capture in one step on a saved card, referenced by its Cresora vault token (cvt_…) — the opaque, partner-scoped handle returned on an hpp_session.completed webhook (or via the stored-credentials API). Raw PAN and raw gateway tokens are never accepted at this boundary (ADR-014 — the Cresora-identity-only surface): a card is first captured through an HPP save-card flow, which vaults it and yields the cvt_… reference.

use_type declares the reuse intent and drives the network CIT/MIT classification. It must be one of the uses the credential was vaulted with — the credential_usages declared on the HPP session that saved the card (readable as scope on the stored-credentials API); an intent outside that scope is refused with 422 stored_credential_scope_violation. Every credential carries at least one usage: the session that saves it must declare credential_usages (enforced at session create since 2026-08):

  • ONE_TIME_FUTURE — cardholder-initiated (the customer is present, paying with their saved card). Surcharge and convenience fee are computed server-side and the merchant's AVS policy is applied.
  • RECURRING / INSTALLMENT / UNSCHEDULED_COF — merchant-initiated; the amount is billed as-is (no surcharge / convenience fee, no AVS policy — the payer is not at the checkout to satisfy a step-up).

A declined charge is still a 200 with state = FAILED and a decline_code. A 422 stored_credential_not_chargeable with retryable: true means the vault entry's owning-customer link is still being established — retry shortly, do not re-enrol the payer. With retryable: false the vault entry predates the current charge-identity requirements — the payer must re-establish the payment method through a save hosted-page flow.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/transactions" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "merchant_id": "01885fec-8c0f-7a31-9bbb-3e5b9a1f8c42",    "type": "SALE",    "amount": "50.00",    "currency": "USD",    "vault_token": "cvt_01885fec-4444-7a31-9bbb-3e5b9a1f8c42",    "use_type": "ONE_TIME_FUTURE"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",  "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",  "type": "AUTHORIZATION",  "state": "INITIATED",  "amount": "string",  "currency": "USD",  "entry_mode": "KEYED",  "surcharge_amount": "string",  "surcharge_reversed_amount": "string",  "convenience_fee_amount": "string",  "convenience_fee_disclosure_acknowledged_at": "2019-08-24T14:15:22Z",  "convenience_fee_disclosure_channel": "VIRTUAL_TERMINAL",  "surcharge_disclosure_acknowledged_at": "2019-08-24T14:15:22Z",  "surcharge_disclosure_channel": "VIRTUAL_TERMINAL",  "tax_amount": "string",  "decline_code": "insufficient_funds",  "avs_response_code": "string",  "cv_response_code": "string",  "three_ds": {    "challenge_url": "http://example.com",    "acs_transaction_id": "string",    "version": "2.1.0",    "expires_at": "2019-08-24T14:15:22Z"  },  "three_ds_failure_reason": "challenge_failed",  "custom_fields": [    {      "name": "string",      "value": "string"    }  ],  "level2_data": {    "po_number": "string",    "merchant_zip": "string"  },  "level3_data": {    "ship_from_zip": "string",    "destination_zip": "string",    "destination_country_code": "string",    "invoice_number": "string",    "order_number": "string",    "duty_amount": "string",    "freight_amount": "string",    "discount_amount": "string",    "line_items": [      {        "product_code": "string",        "commodity_code": "string",        "description": "string",        "upc": "string",        "invoice_number": "string",        "tax_type": "string",        "quantity": "string",        "unit_of_measure": "string",        "unit_price": "string",        "discount_amount": "string",        "total_amount": "string",        "tax_amount": "string",        "tax_rate": "string",        "extended_amount": "string",        "freight_amount": "string",        "duty_amount": "string",        "tax_included": true      }    ]  },  "created_at": "2019-08-24T14:15:22Z",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e"}
GET/transactions/summary

Authorization

BearerAuth
AuthorizationBearer <token>

Cresora API key, sent as an opaque bearer token in the Authorization header. Format:

csk_<prefix>_<random>
  • <prefix> — 8 URL-safe chars, shown in UI and logs for identification without revealing the full key (e.g. csk_Ab3kX9mQ…). Use ApiKey.prefix to match.
  • <random> — 24+ cryptographically random URL-safe chars.

Obtain via Partner Portal → Settings → API keys. Keys are only shown in full at creation/rotation time — Cresora does not retain the full value in retrievable form. Rotate any key that may have been exposed via logs, client code, or source control.

In: header

Query Parameters

merchant_id?string
Formatuuid
q?string

Free-text search over opaque identifiers, trimmed before matching: case-insensitive substring on gateway_transaction_id; exact match on the transaction id or merchant_id when the value parses as a UUID. Unlike the list operation, a 4-digit value does NOT match ACH routing/account last-4 — this read model carries no such columns. Amount, state and type are not searched — use their dedicated parameters.

Lengthlength <= 200
state?string

Transaction lifecycle state. Maps to domain TransactionState. Aligned with implementation at T-3.10 (3DS2 authentication).

  • INITIATED — created, not yet submitted to gateway
  • THREE_DS_PENDING — a 3DS challenge is outstanding, waiting for the customer to complete. The three_ds projection carries challenge_url; the customer browser is redirected there and the ISV then calls POST /transactions/{id}/three-ds/complete to resolve the transaction. 15-minute TTL; on timeout / abandonment the server-side sweep promotes the row to THREE_DS_FAILED with three_ds_failure_reason = callback_timeout. Also listen for the three_ds.completed webhook for an eventually-consistent ack path. No current POST /transactions create path issues a step-up — the saved-card SALE charges an already-authenticated vault credential; this state and the completion endpoint are retained for reserved card-authentication flows.
  • THREE_DS_FAILED — terminal 3DS authentication failure. The three_ds_failure_reason field carries one of: challenge_failed, challenge_abandoned, callback_timeout, signature_invalid, unsupported_card, issuer_declined. The transaction is not authorized — no funds are held. Distinct from the generic FAILED state so chargeback / retry logic can dispatch on the 3DS-specific cause.
  • AUTHORIZED — funds held, not yet captured
  • CAPTURED — capture submitted, awaiting settlement
  • SUBMITTED — ACH entry accepted into the ODFI origination batch (T-4.2). Distinct from CAPTURED because card-rail void / refund / auth-reverse rules don't map onto ACH semantics. Clearing happens 1-3 banking days later via the settlement webhook (SUBMITTED → SETTLED on cleared; a NACHA return drives SUBMITTED → RETURNED / SETTLED → RETURNED with an R-code — see the transaction.returned webhook).
  • SETTLED — funds moved into the merchant batch (end of day)
  • RETURNED — terminal: the ACH entry came back with a NACHA R-code, from SUBMITTED or SETTLED
  • VOIDED — cancelled pre-settlement
  • REFUNDED — fully refunded post-settlement (cumulative refund equals original amount)
  • PARTIALLY_REFUNDED — one or more partial refunds issued, remaining refundable capacity > 0. Re-entrant: additional partial refunds are accepted until cumulative == original amount, at which point the state advances to REFUNDED.
  • REVERSED — authorization released (card) or NACHA reversal (ACH)
  • FAILED — terminal failure state; see decline_code for cause (covers both 3DS-specific and non-3DS failures)
  • DISPUTED — chargeback opened against a SETTLED transaction (Sprint 7 dispute lifecycle); evidence-gathering window open.
  • CHARGED_BACK — chargeback lost / resolved against the merchant.
  • VERIFIED — terminal state for CARD_VERIFICATION ($0 auth). No auth hold, no settlement, no auth-reverse / void semantics apply. Inspect avs_response_code + cv_response_code for the verification outcome.

Value in

  • "INITIATED"
  • "THREE_DS_PENDING"
  • "THREE_DS_FAILED"
  • "AUTHORIZED"
  • "CAPTURED"
  • "SUBMITTED"
  • "SETTLED"
  • "VOIDED"
  • "REFUNDED"
  • "PARTIALLY_REFUNDED"
  • "REVERSED"
  • "RETURNED"
  • "FAILED"
  • "DISPUTED"
  • "CHARGED_BACK"
  • "VERIFIED"
type?string

Transaction type. Maps 1:1 to the domain TransactionType enum.

Value in

  • "AUTHORIZATION"
  • "SALE"
  • "CAPTURE"
  • "PARTIAL_CAPTURE"
  • "CAPTURE_ALL"
  • "AUTH_REVERSAL"
  • "PARTIAL_AUTH_REVERSAL"
  • "VOID"
  • "REFUND"
  • "PARTIAL_REFUND"
  • "CARD_VERIFICATION"
  • "SURCHARGE"
  • "ACH_DEBIT"
  • "ACH_REFUND"
  • "ACH_REVERSAL"
  • "ACH_VOID"
  • "ACH_RETURN"
  • "RECURRING_CREATE"
  • "RECURRING_UPDATE"
  • "RECURRING_CANCEL"
  • "RECURRING_RETRY"
  • "RECURRING_PAUSE"
  • "RECURRING_RESUME"
  • "RECURRING_COMPLETION"
  • "REPEAT_SALE"
  • "ADJUSTMENT"
  • "BATCH_CLOSE"
rail?string

Value in

  • "ACH"
  • "CARD"
from?string
Formatdate-time
to?string
Formatdate-time
amount_min?string
amount_max?string

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/transactions/summary"
{  "total_count": 0,  "total_volume": 0,  "count_by_state": {    "property1": 0,    "property2": 0  },  "count_by_rail": {    "property1": 0,    "property2": 0  },  "approved_count": 0,  "declined_count": 0,  "auth_rate": 0,  "refund_count": 0,  "refund_volume": 0,  "open_dispute_count": 0}
GET/transactions/export

Authorization

BearerAuth
AuthorizationBearer <token>

Cresora API key, sent as an opaque bearer token in the Authorization header. Format:

csk_<prefix>_<random>
  • <prefix> — 8 URL-safe chars, shown in UI and logs for identification without revealing the full key (e.g. csk_Ab3kX9mQ…). Use ApiKey.prefix to match.
  • <random> — 24+ cryptographically random URL-safe chars.

Obtain via Partner Portal → Settings → API keys. Keys are only shown in full at creation/rotation time — Cresora does not retain the full value in retrievable form. Rotate any key that may have been exposed via logs, client code, or source control.

In: header

Query Parameters

merchant_id?string
Formatuuid
q?string

Free-text search over opaque identifiers, trimmed before matching: case-insensitive substring on gateway_transaction_id; exact match on the transaction id or merchant_id when the value parses as a UUID. Unlike the list operation, a 4-digit value does NOT match ACH routing/account last-4 — this read model carries no such columns. Amount, state and type are not searched — use their dedicated parameters.

Lengthlength <= 200
state?string

Transaction lifecycle state. Maps to domain TransactionState. Aligned with implementation at T-3.10 (3DS2 authentication).

  • INITIATED — created, not yet submitted to gateway
  • THREE_DS_PENDING — a 3DS challenge is outstanding, waiting for the customer to complete. The three_ds projection carries challenge_url; the customer browser is redirected there and the ISV then calls POST /transactions/{id}/three-ds/complete to resolve the transaction. 15-minute TTL; on timeout / abandonment the server-side sweep promotes the row to THREE_DS_FAILED with three_ds_failure_reason = callback_timeout. Also listen for the three_ds.completed webhook for an eventually-consistent ack path. No current POST /transactions create path issues a step-up — the saved-card SALE charges an already-authenticated vault credential; this state and the completion endpoint are retained for reserved card-authentication flows.
  • THREE_DS_FAILED — terminal 3DS authentication failure. The three_ds_failure_reason field carries one of: challenge_failed, challenge_abandoned, callback_timeout, signature_invalid, unsupported_card, issuer_declined. The transaction is not authorized — no funds are held. Distinct from the generic FAILED state so chargeback / retry logic can dispatch on the 3DS-specific cause.
  • AUTHORIZED — funds held, not yet captured
  • CAPTURED — capture submitted, awaiting settlement
  • SUBMITTED — ACH entry accepted into the ODFI origination batch (T-4.2). Distinct from CAPTURED because card-rail void / refund / auth-reverse rules don't map onto ACH semantics. Clearing happens 1-3 banking days later via the settlement webhook (SUBMITTED → SETTLED on cleared; a NACHA return drives SUBMITTED → RETURNED / SETTLED → RETURNED with an R-code — see the transaction.returned webhook).
  • SETTLED — funds moved into the merchant batch (end of day)
  • RETURNED — terminal: the ACH entry came back with a NACHA R-code, from SUBMITTED or SETTLED
  • VOIDED — cancelled pre-settlement
  • REFUNDED — fully refunded post-settlement (cumulative refund equals original amount)
  • PARTIALLY_REFUNDED — one or more partial refunds issued, remaining refundable capacity > 0. Re-entrant: additional partial refunds are accepted until cumulative == original amount, at which point the state advances to REFUNDED.
  • REVERSED — authorization released (card) or NACHA reversal (ACH)
  • FAILED — terminal failure state; see decline_code for cause (covers both 3DS-specific and non-3DS failures)
  • DISPUTED — chargeback opened against a SETTLED transaction (Sprint 7 dispute lifecycle); evidence-gathering window open.
  • CHARGED_BACK — chargeback lost / resolved against the merchant.
  • VERIFIED — terminal state for CARD_VERIFICATION ($0 auth). No auth hold, no settlement, no auth-reverse / void semantics apply. Inspect avs_response_code + cv_response_code for the verification outcome.

Value in

  • "INITIATED"
  • "THREE_DS_PENDING"
  • "THREE_DS_FAILED"
  • "AUTHORIZED"
  • "CAPTURED"
  • "SUBMITTED"
  • "SETTLED"
  • "VOIDED"
  • "REFUNDED"
  • "PARTIALLY_REFUNDED"
  • "REVERSED"
  • "RETURNED"
  • "FAILED"
  • "DISPUTED"
  • "CHARGED_BACK"
  • "VERIFIED"
type?string

Transaction type. Maps 1:1 to the domain TransactionType enum.

Value in

  • "AUTHORIZATION"
  • "SALE"
  • "CAPTURE"
  • "PARTIAL_CAPTURE"
  • "CAPTURE_ALL"
  • "AUTH_REVERSAL"
  • "PARTIAL_AUTH_REVERSAL"
  • "VOID"
  • "REFUND"
  • "PARTIAL_REFUND"
  • "CARD_VERIFICATION"
  • "SURCHARGE"
  • "ACH_DEBIT"
  • "ACH_REFUND"
  • "ACH_REVERSAL"
  • "ACH_VOID"
  • "ACH_RETURN"
  • "RECURRING_CREATE"
  • "RECURRING_UPDATE"
  • "RECURRING_CANCEL"
  • "RECURRING_RETRY"
  • "RECURRING_PAUSE"
  • "RECURRING_RESUME"
  • "RECURRING_COMPLETION"
  • "REPEAT_SALE"
  • "ADJUSTMENT"
  • "BATCH_CLOSE"
rail?string

Value in

  • "ACH"
  • "CARD"
from?string
Formatdate-time
to?string
Formatdate-time
amount_min?string
amount_max?string

Response Body

text/csv

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/transactions/export"
"string"
GET/transactions/{transactionId}

Authorization

BearerAuth
AuthorizationBearer <token>

Cresora API key, sent as an opaque bearer token in the Authorization header. Format:

csk_<prefix>_<random>
  • <prefix> — 8 URL-safe chars, shown in UI and logs for identification without revealing the full key (e.g. csk_Ab3kX9mQ…). Use ApiKey.prefix to match.
  • <random> — 24+ cryptographically random URL-safe chars.

Obtain via Partner Portal → Settings → API keys. Keys are only shown in full at creation/rotation time — Cresora does not retain the full value in retrievable form. Rotate any key that may have been exposed via logs, client code, or source control.

In: header

Path Parameters

transactionId*string
Formatuuid

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/transactions/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",  "type": "AUTHORIZATION",  "rail": "CARD",  "state": "INITIATED",  "amount": 0,  "surcharge_amount": 0,  "surcharge_reversed_amount": 0,  "tax_amount": 0,  "currency": "USD",  "entry_mode": "string",  "approval_code": "string",  "decline_code": "insufficient_funds",  "decline_reason": "string",  "avs_response_code": "string",  "cv_response_code": "string",  "card_last4": "string",  "routing_last4": "string",  "account_last4": "string",  "account_type": "CHECKING",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "sec_code": "WEB",  "idempotency_key": "string",  "custom_fields": [    {      "name": "string",      "value": "string"    }  ],  "level2_data": {    "po_number": "string",    "merchant_zip": "string"  },  "level3_data": {    "ship_from_zip": "string",    "destination_zip": "string",    "destination_country_code": "string",    "invoice_number": "string",    "order_number": "string",    "duty_amount": "string",    "freight_amount": "string",    "discount_amount": "string",    "line_items": [      {        "product_code": "string",        "commodity_code": "string",        "description": "string",        "upc": "string",        "invoice_number": "string",        "tax_type": "string",        "quantity": "string",        "unit_of_measure": "string",        "unit_price": "string",        "discount_amount": "string",        "total_amount": "string",        "tax_amount": "string",        "tax_rate": "string",        "extended_amount": "string",        "freight_amount": "string",        "duty_amount": "string",        "tax_included": true      }    ]  },  "parent_transaction_id": "2862f816-fb62-4845-833b-6951bbef56b3",  "recurring_contract_id": "06e8cf01-8f38-4d73-81db-510f9724f797",  "settled_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "available_actions": [    "capture"  ],  "refundable_balance": {    "original": 0,    "refunded_to_date": 0,    "remaining": 0  },  "state_transitions": [    {      "from_state": "string",      "to_state": "string",      "actor_type": "string",      "reason": "string",      "occurred_at": "2019-08-24T14:15:22Z"    }  ],  "related_transactions": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "type": "AUTHORIZATION",      "rail": "CARD",      "state": "INITIATED",      "amount": 0,      "parent_transaction_id": "2862f816-fb62-4845-833b-6951bbef56b3",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "disputes": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "state": "RECEIVED",      "reason_category": "string",      "reason_code": "string",      "reason_description": "string",      "amount": 0,      "currency": "USD",      "case_number": "string",      "response_deadline": "2019-08-24",      "open": true    }  ]}
POST/transactions/{transactionId}/three-ds/complete

Authorization

BearerAuth
AuthorizationBearer <token>

Cresora API key, sent as an opaque bearer token in the Authorization header. Format:

csk_<prefix>_<random>
  • <prefix> — 8 URL-safe chars, shown in UI and logs for identification without revealing the full key (e.g. csk_Ab3kX9mQ…). Use ApiKey.prefix to match.
  • <random> — 24+ cryptographically random URL-safe chars.

Obtain via Partner Portal → Settings → API keys. Keys are only shown in full at creation/rotation time — Cresora does not retain the full value in retrievable form. Rotate any key that may have been exposed via logs, client code, or source control.

In: header

Path Parameters

transactionId*string
Formatuuid

Header Parameters

Idempotency-Key*string

Client-generated unique key — a UUIDv4 is the recommended form. Cresora deduplicates within a 24-hour window scoped to the partner.

Format: 1–128 characters of letters, digits, . _ : -. Anything else is rejected with 400 validation_error. The character set is narrower than base64: padded base64 (+ / =) is NOT accepted, base64url is. The key is forwarded verbatim to the payment gateway on transaction creates, so it must satisfy the gateway's key contract too — rejecting locally gives you an actionable error instead of an opaque upstream failure mid-request.

Reserved prefixes — rejected with 400 idempotency_key_reserved:

  • hpp:, recurring: — Cresora's own server-minted deterministic keys. A client key in these namespaces could collide with a platform-generated record.
  • rb:, inv-charge:, inv-installment: — reserved by the payment gateway for its internally-minted keys.

Replay semantics:

  • Same key + same request body → Cresora returns the cached response from the original call. Response includes header X-Idempotent-Replay: true so the client can distinguish replays from fresh executions. Status code, body and side effects are identical to the original call.
  • Same key + different body → 422 idempotency_key_reused. Generate a new key and retry, or re-send the original body.
  • Key older than 24 hours → treated as a fresh key; no replay guarantee from beyond the window.

Retrying after an indeterminate failure. On 502 gateway_outcome_unknown the transaction is recorded as pending and the outcome is not yet known — retry with the SAME key (a fresh key risks a double charge) or poll the transaction. This is also what a gateway-side "an earlier request with this key is still in flight" response surfaces as.

Do NOT reuse keys across different partners. Scope is enforced per partner_id so the same key in partner A and partner B is independent.

Match^[A-Za-z0-9._:\-]+$
Length1 <= length <= 128

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Completes a 3DS challenge after the customer returns from the issuer's challenge page. The challenge_response is the opaque token returned in the redirect query string (or POSTed form parameter, depending on flow). merchant_id is required so the use case can resolve the gateway merchant context (gateway_merchant_id) without an extra round-trip to the IAM key scope — the value MUST match the merchant on the parent transaction, otherwise the call is rejected as validation_error.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/transactions/497f6eca-6276-4993-bfeb-53cbbbba6f08/three-ds/complete" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "challenge_response": "string",    "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",  "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",  "type": "AUTHORIZATION",  "state": "INITIATED",  "amount": "string",  "currency": "USD",  "entry_mode": "KEYED",  "surcharge_amount": "string",  "surcharge_reversed_amount": "string",  "convenience_fee_amount": "string",  "convenience_fee_disclosure_acknowledged_at": "2019-08-24T14:15:22Z",  "convenience_fee_disclosure_channel": "VIRTUAL_TERMINAL",  "surcharge_disclosure_acknowledged_at": "2019-08-24T14:15:22Z",  "surcharge_disclosure_channel": "VIRTUAL_TERMINAL",  "tax_amount": "string",  "decline_code": "insufficient_funds",  "avs_response_code": "string",  "cv_response_code": "string",  "three_ds": {    "challenge_url": "http://example.com",    "acs_transaction_id": "string",    "version": "2.1.0",    "expires_at": "2019-08-24T14:15:22Z"  },  "three_ds_failure_reason": "challenge_failed",  "custom_fields": [    {      "name": "string",      "value": "string"    }  ],  "level2_data": {    "po_number": "string",    "merchant_zip": "string"  },  "level3_data": {    "ship_from_zip": "string",    "destination_zip": "string",    "destination_country_code": "string",    "invoice_number": "string",    "order_number": "string",    "duty_amount": "string",    "freight_amount": "string",    "discount_amount": "string",    "line_items": [      {        "product_code": "string",        "commodity_code": "string",        "description": "string",        "upc": "string",        "invoice_number": "string",        "tax_type": "string",        "quantity": "string",        "unit_of_measure": "string",        "unit_price": "string",        "discount_amount": "string",        "total_amount": "string",        "tax_amount": "string",        "tax_rate": "string",        "extended_amount": "string",        "freight_amount": "string",        "duty_amount": "string",        "tax_included": true      }    ]  },  "created_at": "2019-08-24T14:15:22Z",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e"}