Errors
Non-success responses use one stable JSON envelope so merchants can log a request identifier without exposing request bodies or credentials. Use the HTTP status for the broad failure class,code for application logic,
and request_id when correlating a failed request.
Draft error catalogue
Error messages are for people and may change. Branch application logic on
code, not title or detail.
Idempotency
POST /v2/payments requires an Idempotency-Key containing 16 to 128 ASCII
characters. The draft permits letters, numbers, ., _, ~, and -, with a
letter or number as the first character.
Required behaviour
- Reuse the same key only with byte-for-byte equivalent logical content.
- Never reuse a key for another merchant order.
- If a response is lost, do not invent a new key or create a second logical payment.
- Treat
submission_unknownas unresolved, not as success or failure. - Make downstream fulfilment idempotent independently of API idempotency.
Ambiguous create outcome
If the connection closes before a complete create response:- Preserve the merchant reference, original request body, idempotency key, timestamped attempt record, and any returned request identifier.
- Do not send a new logical payment request.
- Do not promise the customer that creation failed.
- Wait for an authoritative payment response or
payment.updatedevent before proceeding.