API ReferenceTransactions
Retry a transaction
POST /v1/transactions/{id}/retry : retry a failed transaction.
POST /v1/transactions/{id}/retry
Headers
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer sk_... |
Idempotency-Key | yes | unique per retry |
Path params
| Param | Type | Notes |
|---|---|---|
id | string | Transaction ULID |
What can be retried
Only failed transactions: and only when the failure.code is recoverable
(PROVIDER_ERROR, INTERNAL, RATE_LIMITED). Business-rule failures
(COMPLIANCE_DENIED, INSUFFICIENT_FUNDS, LIMIT_EXCEEDED) are final :
retrying returns 409.
Request
curl -X POST https://api.ouipay.com/v1/transactions/01M2S18.../retry \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: retry-8842-1"Response 200
The same transaction, re-entered at pending: a new attempt under the same
id, recorded in its status history.
Errors
| HTTP | error.code | Cause |
|---|---|---|
| 404 | NOT_FOUND | No such transaction |
| 409 | CONFLICT | Not failed, or unrecoverable code |