Webhooks
Manage webhook subscriptions — event types, delivery URLs, HMAC secret rotation. See `webhooks:` section for event schemas. **Card-present webhooks.** These events tell your software what happened to a sale it started on a terminal, and to the terminals themselves. None is sent yet. Once Cresora starts sending an event, it can be subscribed to by name and gets its entry under `webhooks:`. | Event | Sent when | | --- | --- | | `sale.created` | Cresora accepted and stored the sale | | `sale.sent` | Cresora sent the sale to the terminal, once; the terminal has not answered yet | | `sale.rejected` | The terminal or Cresora refused the sale, with a reason code and a `retryable` flag | | `sale.in_progress` | The terminal accepted the sale and shows the amount | | `sale.cancel_requested` | Cresora sent your cancel; the terminal has not confirmed it | | `sale.cancelled` | The terminal confirmed the cancel before the point of no return (once the card is read and any PIN or other step it asks for first is done) | | `sale.expired` | The sale's wait time passed before the terminal took it: it was never sent, or the terminal says it never got it | | `sale.completed` | The sale ended approved, partly approved, declined or reversed; read `state` for which | | `sale.failed` | A terminal or gateway error with nothing authorized (also how a sale that was `unknown` ends as `failed`), or a cancel by the clerk or the customer on the terminal; nothing charged; `failure.reason` says which | | `sale.unknown` | No answer in time; the money may or may not be taken: never treat it as declined or as nothing charged | | `terminal.available` | A terminal that refused your last sale as `busy` is free again | | `terminal.offline` / `terminal.online` | The terminal missed two heartbeats in a row, or is back after that; a shorter drop sends nothing | | `terminal.suspended` / `terminal.reinstated` | The terminal was suspended, or brought back | *What each event carries.* A `sale.*` event carries the whole sale: the fields of the sale's read, `GET /terminal-payments/{saleId}`, which is published once it is built, spelled like every webhook `data`: camelCase keys, and amounts as JSON numbers where the read has strings. A `terminal.*` event carries the terminal's whole current state: the fields of the `Terminal` resource and whether it is online. Cresora adds no card data and no customer names. *Keep the highest `version`.* Every sale event carries the sale's `version`, and every terminal event the terminal's. It goes up with every change and never down. Events can arrive out of order, one in between can be skipped, and a redelivery can send an old one again: keep the state with the highest `version` and ignore a lower one. A sale can still change later, with a higher `version`, for example: a sale reported `unknown` that later gets its result, as a new `sale.completed` or `sale.failed`; an approval that is reversed, or a tip change, as a new `sale.completed`; or a chargeback. *Money back.* `approved` says the gateway approved the sale, not that the money is still taken. When you ask for a void or a refund, or the merchant refunds in the portal, you hear its outcome the way you do for an online payment. An approval undone for one of the reasons in `reversal.reason` comes as `reversed`. *A busy terminal.* A sale sent while the terminal is busy with another sale is refused at once: `sale.rejected`, whose `rejection` has reason `busy` and a `busyWith` saying what holds the terminal. Nothing queues. When the terminal is free, Cresora sends `terminal.available` once, for your latest sale it refused `busy`. The two can reach you in either order: once you have both, send that sale again, once, as a new sale with its own `saleId` under a new `Idempotency-Key`; a redelivered `sale.rejected` is not a second refusal. `terminal.available` is a notice, not a change of state: act on it whatever its `version`. If the terminal is busy again, the new sale is refused `busy` too, and the next `terminal.available` follows. *A cancel can come too late.* After `sale.cancel_requested`, the sale can still end other than `cancelled`: it may already be past the point of no return, its result may have come first, or the terminal may have refused the sale. Act on the event with the highest `version`, never on the cancel request.
x-cresora-status: planned in the canonical contract: they have no route on any host and return 404 (or 501 for reserved discriminator variants) until released. There is no separate preview stream, no feature flag to enable one, and no enrollment — the badge on each operation tells you whether it is served. See the stable /api/v1 reference for what you can call today. Like the stable API, these operations are server-to-server: there is no interactive console here. Download the preview spec (YAML)./webhook-subscriptionsAuthorization
BearerAuth 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…). UseApiKey.prefixto 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
Opaque pagination cursor from previous response. Do not parse.
length <= 256Items per page (1–100).
1 <= value <= 10025Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/webhook-subscriptions"{ "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "url": "http://example.com", "description": "string", "state": "ACTIVE", "event_type_patterns": [ "string" ], "merchant_scope_mode": "PARTNER_DEFAULT", "merchant_ids": [ "006a4151-5819-498d-ace5-e10247e992c5" ], "secret_preview": "string", "last_delivered_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" } ], "pagination": { "next_cursor": "string", "has_more": true, "total_count": 0 }}/webhook-subscriptionsAuthorization
BearerAuth 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…). UseApiKey.prefixto 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
Client-generated unique key — a UUIDv4 is the recommended form. Cresora deduplicates within a 24-hour window scoped to the partner. On an admin console operation the 24-hour response cache is scoped to the operator instead; an operation that also records the key with the resource it creates or changes answers that key from that record, whichever operator sends it.
Format: 1–128 characters of letters, digits, . _ : -. On every write, a key over 128 characters is rejected with
400 idempotency_key_too_long and a blank or missing key with
400 idempotency_key_required. A character outside that set is
rejected with 400 validation_error by the endpoints that record or
forward the key, such as transaction creates. 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:,hpp-contract:,recurring:— Cresora's own server-minted deterministic keys, rejected on any write. 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, rejected on the transaction creates, which forward the key to the gateway, and on some other writes.
Replay semantics:
- Same key + same request body → Cresora returns the cached
response from the original call. Response includes header
X-Idempotent-Replay: trueso 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 → the response cache has expired.
On a create that persists the key, the created resource still
answers for as long as it exists: the same request replays it,
a different one answers
422 idempotency_key_reused.POST /transactionsis such a create: it replays from the transaction it recorded under the key, matched on key andpartner_id, which does not expire. (3-D Secure completion answers a repeat from the transaction's current state instead.) Elsewhere the key is treated as fresh.
After an indeterminate outcome. 502 gateway_outcome_unknown
means the outcome is unknown, not that the request failed: it may
have been processed. It is always retryable: false — never resend
it automatically, and never under a fresh key (a fresh key risks a
double charge or a double refund).
- Body carries
replay: "same_idempotency_key"— Cresora recorded the attempt as pending (state: INITIATED) and reconciles it automatically. Resend the identical request with the SAME key to obtain the transaction: it is not sent to the gateway again, and the answer is200with the transaction in its state at that moment, never a second charge. ThenGET /transactions/{transactionId}for its final state. That200is cached for 24 hours, so a further same-key resend returns the same snapshot, not necessarily the final state. This is also what anACH_DEBIT/ACH_REFUNDgets when the gateway answers a result code Cresora does not recognise (for example one the gateway added later), or none. A card sale, refund or partial refund answeredSubmit/Pend, an unrecognised result code or none gets it too, but only while the card park flag is on, which it is in no environment. - No
replaymember — Cresora does not promise that a resend is safe. Do not resend automatically, never under a new key, and if the outcome cannot be established contact support quoting theerror_id. The core service answers this way onACH_VOID,ACH_REVERSALandCAPTURE_ALLonPOST /transactions, 3-D Secure completion,POST /merchants/{merchantId}/customersandPOST /contracts, whosedetailsays the outcome of the attempt was not recorded (a resend may repeat it). Cresora's edge answers this way for any POST, PUT or PATCH under this API whose call to its core service failed in any way that does not prove it never left (a timeout or a lost connection included), or when the load balancer in front of the core service answered a5xxitself, even when the core service went on to record the transaction.
Gateway faults on writes Cresora does not record. ACH_VOID,
ACH_REVERSAL and CAPTURE_ALL on POST /transactions, 3-D Secure
completion, POST /merchants/{merchantId}/customers and POST /contracts send the
gateway a call that a resend may repeat, and no Cresora row records
the attempt. Any fault after that call may have been sent answers
502 gateway_outcome_unknown, retryable: false, without replay:
a timeout or a lost connection, a gateway 5xx, or a reply Cresora cannot read (an unparseable 2xx, a 3xx, since redirects are not followed, or a non-JSON body such as a maintenance page). Its detail says the outcome of the attempt was
not recorded. One exception, on the POST /transactions types and 3-D Secure completion: a reply carrying the gateway's create-dedup-store-unavailable error code answers the retryable gateway_unavailable whatever its HTTP status, a 5xx included. A fault that proves the call was never sent
(such as an open circuit, a full concurrency limit, a refused connection, an unresolvable host, a connect timeout, a failed TLS handshake) keeps its retryable gateway_circuit_open,
gateway_unavailable or gateway_timeout, and a resend under the
same key is safe. A gateway 4xx refusal keeps its own code, except a
408: the gateway stopped waiting on a request it may have applied, so
it answers gateway_outcome_unknown too. On
POST /contracts this is the create call: a fault in the activation
call that follows a recorded create keeps its retryable code, and a
resend under the same key resumes that contract. The hosted-page configuration writes and the
admin gateway-provisioning writes describe their own
gateway_outcome_unknown under their 502. On any write, resend
after a retryable code only under the same key, never a new one,
with one exception: retry an hpp_url_missing under a NEW key, since
the same key may return the first session again.
Cresora's edge session-auth routes (/api/auth/*) and webhook
ingress (/api/v1/webhooks/*) answer their own gateway_unavailable,
retryable: true, when their call to the core service fails, sent
or not, and when the load balancer in front of the core service answered a 5xx itself. In both cases POST /api/auth/magic-link and POST /api/auth/logout
answer 204 instead. Every 204 from POST /api/auth/magic-link
carries Retry-After: the configured sign-in cooldown length in seconds,
the same value whatever the address or the outcome, so a client can
wait it out before asking again. The gateway_unavailable answer is retryable
by design. No auth call moves money, though a resend can count a
failed password or TOTP check twice toward the lockout. The core
service deduplicates WinkPG webhook events on (provider, event_id)
and DocuSign Connect events on their event reference, and records no
Salesforce event yet, so a redelivery is safe. See
createTransaction.
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.
^[A-Za-z0-9._:\-]+$1 <= length <= 128Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
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
curl -X POST "https://example.com/webhook-subscriptions" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com", "event_type_patterns": [ "string" ] }'{ "subscription": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "url": "http://example.com", "description": "string", "state": "ACTIVE", "event_type_patterns": [ "string" ], "merchant_scope_mode": "PARTNER_DEFAULT", "merchant_ids": [ "006a4151-5819-498d-ace5-e10247e992c5" ], "secret_preview": "string", "last_delivered_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" }, "secret": "string"}/webhook-subscriptions/{subscriptionId}Authorization
BearerAuth 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…). UseApiKey.prefixto 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
uuidResponse Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "url": "http://example.com", "description": "string", "state": "ACTIVE", "event_type_patterns": [ "string" ], "merchant_scope_mode": "PARTNER_DEFAULT", "merchant_ids": [ "006a4151-5819-498d-ace5-e10247e992c5" ], "secret_preview": "string", "last_delivered_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z"}/webhook-subscriptions/{subscriptionId}Authorization
BearerAuth 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…). UseApiKey.prefixto 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
uuidHeader Parameters
Client-generated unique key — a UUIDv4 is the recommended form. Cresora deduplicates within a 24-hour window scoped to the partner. On an admin console operation the 24-hour response cache is scoped to the operator instead; an operation that also records the key with the resource it creates or changes answers that key from that record, whichever operator sends it.
Format: 1–128 characters of letters, digits, . _ : -. On every write, a key over 128 characters is rejected with
400 idempotency_key_too_long and a blank or missing key with
400 idempotency_key_required. A character outside that set is
rejected with 400 validation_error by the endpoints that record or
forward the key, such as transaction creates. 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:,hpp-contract:,recurring:— Cresora's own server-minted deterministic keys, rejected on any write. 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, rejected on the transaction creates, which forward the key to the gateway, and on some other writes.
Replay semantics:
- Same key + same request body → Cresora returns the cached
response from the original call. Response includes header
X-Idempotent-Replay: trueso 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 → the response cache has expired.
On a create that persists the key, the created resource still
answers for as long as it exists: the same request replays it,
a different one answers
422 idempotency_key_reused.POST /transactionsis such a create: it replays from the transaction it recorded under the key, matched on key andpartner_id, which does not expire. (3-D Secure completion answers a repeat from the transaction's current state instead.) Elsewhere the key is treated as fresh.
After an indeterminate outcome. 502 gateway_outcome_unknown
means the outcome is unknown, not that the request failed: it may
have been processed. It is always retryable: false — never resend
it automatically, and never under a fresh key (a fresh key risks a
double charge or a double refund).
- Body carries
replay: "same_idempotency_key"— Cresora recorded the attempt as pending (state: INITIATED) and reconciles it automatically. Resend the identical request with the SAME key to obtain the transaction: it is not sent to the gateway again, and the answer is200with the transaction in its state at that moment, never a second charge. ThenGET /transactions/{transactionId}for its final state. That200is cached for 24 hours, so a further same-key resend returns the same snapshot, not necessarily the final state. This is also what anACH_DEBIT/ACH_REFUNDgets when the gateway answers a result code Cresora does not recognise (for example one the gateway added later), or none. A card sale, refund or partial refund answeredSubmit/Pend, an unrecognised result code or none gets it too, but only while the card park flag is on, which it is in no environment. - No
replaymember — Cresora does not promise that a resend is safe. Do not resend automatically, never under a new key, and if the outcome cannot be established contact support quoting theerror_id. The core service answers this way onACH_VOID,ACH_REVERSALandCAPTURE_ALLonPOST /transactions, 3-D Secure completion,POST /merchants/{merchantId}/customersandPOST /contracts, whosedetailsays the outcome of the attempt was not recorded (a resend may repeat it). Cresora's edge answers this way for any POST, PUT or PATCH under this API whose call to its core service failed in any way that does not prove it never left (a timeout or a lost connection included), or when the load balancer in front of the core service answered a5xxitself, even when the core service went on to record the transaction.
Gateway faults on writes Cresora does not record. ACH_VOID,
ACH_REVERSAL and CAPTURE_ALL on POST /transactions, 3-D Secure
completion, POST /merchants/{merchantId}/customers and POST /contracts send the
gateway a call that a resend may repeat, and no Cresora row records
the attempt. Any fault after that call may have been sent answers
502 gateway_outcome_unknown, retryable: false, without replay:
a timeout or a lost connection, a gateway 5xx, or a reply Cresora cannot read (an unparseable 2xx, a 3xx, since redirects are not followed, or a non-JSON body such as a maintenance page). Its detail says the outcome of the attempt was
not recorded. One exception, on the POST /transactions types and 3-D Secure completion: a reply carrying the gateway's create-dedup-store-unavailable error code answers the retryable gateway_unavailable whatever its HTTP status, a 5xx included. A fault that proves the call was never sent
(such as an open circuit, a full concurrency limit, a refused connection, an unresolvable host, a connect timeout, a failed TLS handshake) keeps its retryable gateway_circuit_open,
gateway_unavailable or gateway_timeout, and a resend under the
same key is safe. A gateway 4xx refusal keeps its own code, except a
408: the gateway stopped waiting on a request it may have applied, so
it answers gateway_outcome_unknown too. On
POST /contracts this is the create call: a fault in the activation
call that follows a recorded create keeps its retryable code, and a
resend under the same key resumes that contract. The hosted-page configuration writes and the
admin gateway-provisioning writes describe their own
gateway_outcome_unknown under their 502. On any write, resend
after a retryable code only under the same key, never a new one,
with one exception: retry an hpp_url_missing under a NEW key, since
the same key may return the first session again.
Cresora's edge session-auth routes (/api/auth/*) and webhook
ingress (/api/v1/webhooks/*) answer their own gateway_unavailable,
retryable: true, when their call to the core service fails, sent
or not, and when the load balancer in front of the core service answered a 5xx itself. In both cases POST /api/auth/magic-link and POST /api/auth/logout
answer 204 instead. Every 204 from POST /api/auth/magic-link
carries Retry-After: the configured sign-in cooldown length in seconds,
the same value whatever the address or the outcome, so a client can
wait it out before asking again. The gateway_unavailable answer is retryable
by design. No auth call moves money, though a resend can count a
failed password or TOTP check twice toward the lockout. The core
service deduplicates WinkPG webhook events on (provider, event_id)
and DocuSign Connect events on their event reference, and records no
Salesforce event yet, so a redelivery is safe. See
createTransaction.
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.
^[A-Za-z0-9._:\-]+$1 <= length <= 128Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
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
curl -X PATCH "https://example.com/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "url": "http://example.com", "description": "string", "state": "ACTIVE", "event_type_patterns": [ "string" ], "merchant_scope_mode": "PARTNER_DEFAULT", "merchant_ids": [ "006a4151-5819-498d-ace5-e10247e992c5" ], "secret_preview": "string", "last_delivered_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z"}/webhook-subscriptions/{subscriptionId}Authorization
BearerAuth 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…). UseApiKey.prefixto 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
uuidResponse Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X DELETE "https://example.com/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08"/webhook-subscriptions/{subscriptionId}/rotate-secretAuthorization
BearerAuth 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…). UseApiKey.prefixto 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
uuidHeader Parameters
Client-generated unique key — a UUIDv4 is the recommended form. Cresora deduplicates within a 24-hour window scoped to the partner. On an admin console operation the 24-hour response cache is scoped to the operator instead; an operation that also records the key with the resource it creates or changes answers that key from that record, whichever operator sends it.
Format: 1–128 characters of letters, digits, . _ : -. On every write, a key over 128 characters is rejected with
400 idempotency_key_too_long and a blank or missing key with
400 idempotency_key_required. A character outside that set is
rejected with 400 validation_error by the endpoints that record or
forward the key, such as transaction creates. 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:,hpp-contract:,recurring:— Cresora's own server-minted deterministic keys, rejected on any write. 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, rejected on the transaction creates, which forward the key to the gateway, and on some other writes.
Replay semantics:
- Same key + same request body → Cresora returns the cached
response from the original call. Response includes header
X-Idempotent-Replay: trueso 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 → the response cache has expired.
On a create that persists the key, the created resource still
answers for as long as it exists: the same request replays it,
a different one answers
422 idempotency_key_reused.POST /transactionsis such a create: it replays from the transaction it recorded under the key, matched on key andpartner_id, which does not expire. (3-D Secure completion answers a repeat from the transaction's current state instead.) Elsewhere the key is treated as fresh.
After an indeterminate outcome. 502 gateway_outcome_unknown
means the outcome is unknown, not that the request failed: it may
have been processed. It is always retryable: false — never resend
it automatically, and never under a fresh key (a fresh key risks a
double charge or a double refund).
- Body carries
replay: "same_idempotency_key"— Cresora recorded the attempt as pending (state: INITIATED) and reconciles it automatically. Resend the identical request with the SAME key to obtain the transaction: it is not sent to the gateway again, and the answer is200with the transaction in its state at that moment, never a second charge. ThenGET /transactions/{transactionId}for its final state. That200is cached for 24 hours, so a further same-key resend returns the same snapshot, not necessarily the final state. This is also what anACH_DEBIT/ACH_REFUNDgets when the gateway answers a result code Cresora does not recognise (for example one the gateway added later), or none. A card sale, refund or partial refund answeredSubmit/Pend, an unrecognised result code or none gets it too, but only while the card park flag is on, which it is in no environment. - No
replaymember — Cresora does not promise that a resend is safe. Do not resend automatically, never under a new key, and if the outcome cannot be established contact support quoting theerror_id. The core service answers this way onACH_VOID,ACH_REVERSALandCAPTURE_ALLonPOST /transactions, 3-D Secure completion,POST /merchants/{merchantId}/customersandPOST /contracts, whosedetailsays the outcome of the attempt was not recorded (a resend may repeat it). Cresora's edge answers this way for any POST, PUT or PATCH under this API whose call to its core service failed in any way that does not prove it never left (a timeout or a lost connection included), or when the load balancer in front of the core service answered a5xxitself, even when the core service went on to record the transaction.
Gateway faults on writes Cresora does not record. ACH_VOID,
ACH_REVERSAL and CAPTURE_ALL on POST /transactions, 3-D Secure
completion, POST /merchants/{merchantId}/customers and POST /contracts send the
gateway a call that a resend may repeat, and no Cresora row records
the attempt. Any fault after that call may have been sent answers
502 gateway_outcome_unknown, retryable: false, without replay:
a timeout or a lost connection, a gateway 5xx, or a reply Cresora cannot read (an unparseable 2xx, a 3xx, since redirects are not followed, or a non-JSON body such as a maintenance page). Its detail says the outcome of the attempt was
not recorded. One exception, on the POST /transactions types and 3-D Secure completion: a reply carrying the gateway's create-dedup-store-unavailable error code answers the retryable gateway_unavailable whatever its HTTP status, a 5xx included. A fault that proves the call was never sent
(such as an open circuit, a full concurrency limit, a refused connection, an unresolvable host, a connect timeout, a failed TLS handshake) keeps its retryable gateway_circuit_open,
gateway_unavailable or gateway_timeout, and a resend under the
same key is safe. A gateway 4xx refusal keeps its own code, except a
408: the gateway stopped waiting on a request it may have applied, so
it answers gateway_outcome_unknown too. On
POST /contracts this is the create call: a fault in the activation
call that follows a recorded create keeps its retryable code, and a
resend under the same key resumes that contract. The hosted-page configuration writes and the
admin gateway-provisioning writes describe their own
gateway_outcome_unknown under their 502. On any write, resend
after a retryable code only under the same key, never a new one,
with one exception: retry an hpp_url_missing under a NEW key, since
the same key may return the first session again.
Cresora's edge session-auth routes (/api/auth/*) and webhook
ingress (/api/v1/webhooks/*) answer their own gateway_unavailable,
retryable: true, when their call to the core service fails, sent
or not, and when the load balancer in front of the core service answered a 5xx itself. In both cases POST /api/auth/magic-link and POST /api/auth/logout
answer 204 instead. Every 204 from POST /api/auth/magic-link
carries Retry-After: the configured sign-in cooldown length in seconds,
the same value whatever the address or the outcome, so a client can
wait it out before asking again. The gateway_unavailable answer is retryable
by design. No auth call moves money, though a resend can count a
failed password or TOTP check twice toward the lockout. The core
service deduplicates WinkPG webhook events on (provider, event_id)
and DocuSign Connect events on their event reference, and records no
Salesforce event yet, so a redelivery is safe. See
createTransaction.
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.
^[A-Za-z0-9._:\-]+$1 <= length <= 128Response Body
application/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/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate-secret" \ -H "Idempotency-Key: string"{ "secret": "string", "rotated_at": "2019-08-24T14:15:22Z"}/webhook-subscriptions/{subscriptionId}/test-deliveryAuthorization
BearerAuth 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…). UseApiKey.prefixto 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
uuidHeader Parameters
Client-generated unique key — a UUIDv4 is the recommended form. Cresora deduplicates within a 24-hour window scoped to the partner. On an admin console operation the 24-hour response cache is scoped to the operator instead; an operation that also records the key with the resource it creates or changes answers that key from that record, whichever operator sends it.
Format: 1–128 characters of letters, digits, . _ : -. On every write, a key over 128 characters is rejected with
400 idempotency_key_too_long and a blank or missing key with
400 idempotency_key_required. A character outside that set is
rejected with 400 validation_error by the endpoints that record or
forward the key, such as transaction creates. 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:,hpp-contract:,recurring:— Cresora's own server-minted deterministic keys, rejected on any write. 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, rejected on the transaction creates, which forward the key to the gateway, and on some other writes.
Replay semantics:
- Same key + same request body → Cresora returns the cached
response from the original call. Response includes header
X-Idempotent-Replay: trueso 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 → the response cache has expired.
On a create that persists the key, the created resource still
answers for as long as it exists: the same request replays it,
a different one answers
422 idempotency_key_reused.POST /transactionsis such a create: it replays from the transaction it recorded under the key, matched on key andpartner_id, which does not expire. (3-D Secure completion answers a repeat from the transaction's current state instead.) Elsewhere the key is treated as fresh.
After an indeterminate outcome. 502 gateway_outcome_unknown
means the outcome is unknown, not that the request failed: it may
have been processed. It is always retryable: false — never resend
it automatically, and never under a fresh key (a fresh key risks a
double charge or a double refund).
- Body carries
replay: "same_idempotency_key"— Cresora recorded the attempt as pending (state: INITIATED) and reconciles it automatically. Resend the identical request with the SAME key to obtain the transaction: it is not sent to the gateway again, and the answer is200with the transaction in its state at that moment, never a second charge. ThenGET /transactions/{transactionId}for its final state. That200is cached for 24 hours, so a further same-key resend returns the same snapshot, not necessarily the final state. This is also what anACH_DEBIT/ACH_REFUNDgets when the gateway answers a result code Cresora does not recognise (for example one the gateway added later), or none. A card sale, refund or partial refund answeredSubmit/Pend, an unrecognised result code or none gets it too, but only while the card park flag is on, which it is in no environment. - No
replaymember — Cresora does not promise that a resend is safe. Do not resend automatically, never under a new key, and if the outcome cannot be established contact support quoting theerror_id. The core service answers this way onACH_VOID,ACH_REVERSALandCAPTURE_ALLonPOST /transactions, 3-D Secure completion,POST /merchants/{merchantId}/customersandPOST /contracts, whosedetailsays the outcome of the attempt was not recorded (a resend may repeat it). Cresora's edge answers this way for any POST, PUT or PATCH under this API whose call to its core service failed in any way that does not prove it never left (a timeout or a lost connection included), or when the load balancer in front of the core service answered a5xxitself, even when the core service went on to record the transaction.
Gateway faults on writes Cresora does not record. ACH_VOID,
ACH_REVERSAL and CAPTURE_ALL on POST /transactions, 3-D Secure
completion, POST /merchants/{merchantId}/customers and POST /contracts send the
gateway a call that a resend may repeat, and no Cresora row records
the attempt. Any fault after that call may have been sent answers
502 gateway_outcome_unknown, retryable: false, without replay:
a timeout or a lost connection, a gateway 5xx, or a reply Cresora cannot read (an unparseable 2xx, a 3xx, since redirects are not followed, or a non-JSON body such as a maintenance page). Its detail says the outcome of the attempt was
not recorded. One exception, on the POST /transactions types and 3-D Secure completion: a reply carrying the gateway's create-dedup-store-unavailable error code answers the retryable gateway_unavailable whatever its HTTP status, a 5xx included. A fault that proves the call was never sent
(such as an open circuit, a full concurrency limit, a refused connection, an unresolvable host, a connect timeout, a failed TLS handshake) keeps its retryable gateway_circuit_open,
gateway_unavailable or gateway_timeout, and a resend under the
same key is safe. A gateway 4xx refusal keeps its own code, except a
408: the gateway stopped waiting on a request it may have applied, so
it answers gateway_outcome_unknown too. On
POST /contracts this is the create call: a fault in the activation
call that follows a recorded create keeps its retryable code, and a
resend under the same key resumes that contract. The hosted-page configuration writes and the
admin gateway-provisioning writes describe their own
gateway_outcome_unknown under their 502. On any write, resend
after a retryable code only under the same key, never a new one,
with one exception: retry an hpp_url_missing under a NEW key, since
the same key may return the first session again.
Cresora's edge session-auth routes (/api/auth/*) and webhook
ingress (/api/v1/webhooks/*) answer their own gateway_unavailable,
retryable: true, when their call to the core service fails, sent
or not, and when the load balancer in front of the core service answered a 5xx itself. In both cases POST /api/auth/magic-link and POST /api/auth/logout
answer 204 instead. Every 204 from POST /api/auth/magic-link
carries Retry-After: the configured sign-in cooldown length in seconds,
the same value whatever the address or the outcome, so a client can
wait it out before asking again. The gateway_unavailable answer is retryable
by design. No auth call moves money, though a resend can count a
failed password or TOTP check twice toward the lockout. The core
service deduplicates WinkPG webhook events on (provider, event_id)
and DocuSign Connect events on their event reference, and records no
Salesforce event yet, so a redelivery is safe. See
createTransaction.
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.
^[A-Za-z0-9._:\-]+$1 <= length <= 128Response Body
application/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/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/test-delivery" \ -H "Idempotency-Key: string"{ "envelope_id": "cd819e97-5425-4178-8fcc-567f1dc109ce", "status_code": 0, "latency_ms": 0, "response_body_preview": "string", "response_headers": { "property1": "string", "property2": "string" }, "error": "string"}/webhook-subscriptions/{subscriptionId}/deliveriesAuthorization
BearerAuth 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…). UseApiKey.prefixto 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
uuidQuery Parameters
Pagination token from a previous page's
pagination.next_cursor. Encodes (created_at, id) of the
last row served. Treat as opaque.
Bounded [1, 200]. Default 25.
1 <= value <= 20025Filter by per-attempt outcome.
Value in
- "SUCCEEDED"
- "FAILED_PERMANENT"
- "FAILED_TRANSIENT"
- "EXHAUSTED"
- "REJECTED_SSRF"
- "SKIPPED_SUSPENDED"
Inclusive lower bound on created_at (ISO 8601 UTC). Combine with to for date-range scans. Timestamps are stored to
the microsecond, so digits past the sixth fractional place are
rounded up to the next microsecond for the filter.
date-timeExclusive upper bound on created_at (ISO 8601 UTC). from <= to required, comparing the values as sent; reversed
range returns 400. Digits past the sixth fractional place are
rounded up to the next microsecond for the filter.
date-timeResponse Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries"{ "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7", "event_type": "string", "attempt_number": 1, "status": "SUCCEEDED", "http_status": 0, "duration_ms": 0, "error_message": "string", "next_retry_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" } ], "pagination": { "next_cursor": "string", "has_more": true, "total_count": 0 }}/webhook-subscriptions/{subscriptionId}/deliveries/{eventId}/redeliverAuthorization
BearerAuth 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…). UseApiKey.prefixto 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
uuidThe original event_id from the webhook envelope. Look up the
historical delivery row for this event and enqueue a fresh
attempt with the same envelope (same event_id,
idempotency_key, and data payload).
uuidHeader Parameters
Client-generated unique key — a UUIDv4 is the recommended form. Cresora deduplicates within a 24-hour window scoped to the partner. On an admin console operation the 24-hour response cache is scoped to the operator instead; an operation that also records the key with the resource it creates or changes answers that key from that record, whichever operator sends it.
Format: 1–128 characters of letters, digits, . _ : -. On every write, a key over 128 characters is rejected with
400 idempotency_key_too_long and a blank or missing key with
400 idempotency_key_required. A character outside that set is
rejected with 400 validation_error by the endpoints that record or
forward the key, such as transaction creates. 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:,hpp-contract:,recurring:— Cresora's own server-minted deterministic keys, rejected on any write. 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, rejected on the transaction creates, which forward the key to the gateway, and on some other writes.
Replay semantics:
- Same key + same request body → Cresora returns the cached
response from the original call. Response includes header
X-Idempotent-Replay: trueso 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 → the response cache has expired.
On a create that persists the key, the created resource still
answers for as long as it exists: the same request replays it,
a different one answers
422 idempotency_key_reused.POST /transactionsis such a create: it replays from the transaction it recorded under the key, matched on key andpartner_id, which does not expire. (3-D Secure completion answers a repeat from the transaction's current state instead.) Elsewhere the key is treated as fresh.
After an indeterminate outcome. 502 gateway_outcome_unknown
means the outcome is unknown, not that the request failed: it may
have been processed. It is always retryable: false — never resend
it automatically, and never under a fresh key (a fresh key risks a
double charge or a double refund).
- Body carries
replay: "same_idempotency_key"— Cresora recorded the attempt as pending (state: INITIATED) and reconciles it automatically. Resend the identical request with the SAME key to obtain the transaction: it is not sent to the gateway again, and the answer is200with the transaction in its state at that moment, never a second charge. ThenGET /transactions/{transactionId}for its final state. That200is cached for 24 hours, so a further same-key resend returns the same snapshot, not necessarily the final state. This is also what anACH_DEBIT/ACH_REFUNDgets when the gateway answers a result code Cresora does not recognise (for example one the gateway added later), or none. A card sale, refund or partial refund answeredSubmit/Pend, an unrecognised result code or none gets it too, but only while the card park flag is on, which it is in no environment. - No
replaymember — Cresora does not promise that a resend is safe. Do not resend automatically, never under a new key, and if the outcome cannot be established contact support quoting theerror_id. The core service answers this way onACH_VOID,ACH_REVERSALandCAPTURE_ALLonPOST /transactions, 3-D Secure completion,POST /merchants/{merchantId}/customersandPOST /contracts, whosedetailsays the outcome of the attempt was not recorded (a resend may repeat it). Cresora's edge answers this way for any POST, PUT or PATCH under this API whose call to its core service failed in any way that does not prove it never left (a timeout or a lost connection included), or when the load balancer in front of the core service answered a5xxitself, even when the core service went on to record the transaction.
Gateway faults on writes Cresora does not record. ACH_VOID,
ACH_REVERSAL and CAPTURE_ALL on POST /transactions, 3-D Secure
completion, POST /merchants/{merchantId}/customers and POST /contracts send the
gateway a call that a resend may repeat, and no Cresora row records
the attempt. Any fault after that call may have been sent answers
502 gateway_outcome_unknown, retryable: false, without replay:
a timeout or a lost connection, a gateway 5xx, or a reply Cresora cannot read (an unparseable 2xx, a 3xx, since redirects are not followed, or a non-JSON body such as a maintenance page). Its detail says the outcome of the attempt was
not recorded. One exception, on the POST /transactions types and 3-D Secure completion: a reply carrying the gateway's create-dedup-store-unavailable error code answers the retryable gateway_unavailable whatever its HTTP status, a 5xx included. A fault that proves the call was never sent
(such as an open circuit, a full concurrency limit, a refused connection, an unresolvable host, a connect timeout, a failed TLS handshake) keeps its retryable gateway_circuit_open,
gateway_unavailable or gateway_timeout, and a resend under the
same key is safe. A gateway 4xx refusal keeps its own code, except a
408: the gateway stopped waiting on a request it may have applied, so
it answers gateway_outcome_unknown too. On
POST /contracts this is the create call: a fault in the activation
call that follows a recorded create keeps its retryable code, and a
resend under the same key resumes that contract. The hosted-page configuration writes and the
admin gateway-provisioning writes describe their own
gateway_outcome_unknown under their 502. On any write, resend
after a retryable code only under the same key, never a new one,
with one exception: retry an hpp_url_missing under a NEW key, since
the same key may return the first session again.
Cresora's edge session-auth routes (/api/auth/*) and webhook
ingress (/api/v1/webhooks/*) answer their own gateway_unavailable,
retryable: true, when their call to the core service fails, sent
or not, and when the load balancer in front of the core service answered a 5xx itself. In both cases POST /api/auth/magic-link and POST /api/auth/logout
answer 204 instead. Every 204 from POST /api/auth/magic-link
carries Retry-After: the configured sign-in cooldown length in seconds,
the same value whatever the address or the outcome, so a client can
wait it out before asking again. The gateway_unavailable answer is retryable
by design. No auth call moves money, though a resend can count a
failed password or TOTP check twice toward the lockout. The core
service deduplicates WinkPG webhook events on (provider, event_id)
and DocuSign Connect events on their event reference, and records no
Salesforce event yet, so a redelivery is safe. See
createTransaction.
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.
^[A-Za-z0-9._:\-]+$1 <= length <= 128Response 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
curl -X POST "https://example.com/webhook-subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries/497f6eca-6276-4993-bfeb-53cbbbba6f08/redeliver" \ -H "Idempotency-Key: string"{ "redelivery_id": "7d12b267-de78-4054-b178-2eccdc158225", "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627", "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7", "enqueued_at": "2019-08-24T14:15:22Z"}/webhook-event-typesAuthorization
BearerAuth 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…). UseApiKey.prefixto 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
Catalog statuses to list. Repeat the parameter (?status=stable&status=reserved) or send one comma-separated value (?status=stable,reserved; spaces around an item are ignored in that form). Only the repeated form is described by this schema: the server accepts the comma-separated value, but a client or mock generated from the schema will not send it and a schema validator will refuse it. Omitted, only stable types are returned. Every item must be a status: an empty value or item, like any other unknown value, answers 400.
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/webhook-event-types"[ { "event_type": "string", "description": "string", "source_context": "string", "status": "stable" }]/webhook-metadataAuthorization
BearerAuth 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…). UseApiKey.prefixto 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
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/webhook-metadata"{ "max_subscriptions_per_event_type": 0, "max_merchant_ids_per_subscription": 0, "retry_max_attempts": 0, "retry_window": "string", "retry_policy_description": "string"}