1
A create times out
POST /merchants/{id}/transactions was sent, and no answer came back. You don’t know whether the payment transaction was created.2
Send it again with the same key
Send the same request: the same path, the same body and the same
Idempotency-Key. That’s why you store the key before the first attempt.- If the first attempt created the payment transaction, the answer is its status, 201, with the transaction as it now stands, and an
Idempotent-Replayed: trueheader. - While the first attempt is still running, the answer is 409
IDEMPOTENCY_IN_PROGRESS. Wait a moment, then send it again. - If nothing was made, the request runs now.
checkout. So can the answer to a create you sent once: if an answer has no checkout, get it as the next step shows.3
Get the checkout again
checkout, holding the same live link the first create issued. It’s safe to repeat. Only the owner of the payment transaction can call it: the partner that created it, while the merchant is still with that partner, and otherwise the merchant. Any other caller gets 404.4
Any other keyed create
The same goes for a refund, a payment link, a merchant, a party, a bank account and a webhook endpoint: send the same request with the same key, and get the resource as it now stands. A webhook endpoint’s
signing_secret is one-time too: if an answer has no signing_secret, :rotateSecret issues a new one.5
A write with no key
Read what the error says:
- 503
SERVICE_UNAVAILABLE: nothing was done, or doing it again is harmless, so send it again. - 503
OUTCOME_UNKNOWN: it may have taken effect. Do what the endpoint’s row in Unknown outcomes says: for most, read the resource before deciding, and forPOST /transactions/{id}:executeRefund, send it again.POST /webhook-endpoints/{id}:rotateSecretisn’t safe to repeat: each call replaces the secret again.