Idempotency and retries
Retry requests without creating duplicate payments.
Before creating a deposit or starting a withdrawal, generate and save a unique idempotency key. Send it in Idempotency-Key or the idempotency_key body field. A nonempty header takes precedence.
For a retry, reuse the key and the original customer, connection, amount, country, network and account. Deripay can return the current transaction, which may have progressed since the first request. Its status and message can therefore differ from the original response.
Use a new key for a new payment. If Deripay reports a conflict, check the original transaction before submitting anything else.
Wallet–Options transfers use a UUID request_id in the body. Save it before submission and reuse it with the original transfer body. A transfer has its own UUID even when it is linked to a deposit.
| Response or outcome | Next step |
|---|---|
| Invalid request or account restriction | Correct the input or account issue. Check whether a transaction was already created before resubmitting. |
| 409 conflict | Read the existing transaction or transfer and resolve the conflict. |
| 429 rate limit | Wait for Retry-After. If absent, use increasing delays with jitter. Keep the same key or UUID. |
| 500, 502, 503, 504 or lost response | Read the existing transaction or transfer. Retry with the original request and key or UUID. |
| Customer action required | Follow the transaction's next_action. |
| Reconciliation required or transfer outcome unknown | Keep checking the same record and contact support if needed. |
If a creation response is lost before you receive a transaction ID, resend the original request with the same key to retrieve it. For transfers, use the UUID you saved to read the transfer directly.
Stop repeated verification-code attempts when throttled. To resend a withdrawal email, use the resend endpoint on the existing withdrawal. A timeout, failure message or dismissed transfer does not confirm a refund. Transfer dismissal requires the customer's confirmation after checking both balances.