How to Retry a Payment Request
Use the same merchantTransactionId and merchant ID when retrying a v2 payment request. The service returns the existing payment with its current status, up to the retry limit. See Idempotency & Retries β Reference for the exact rules.
Send and Retry the Requestβ
First Request (Attempt 1)β
Request:
curl -X POST ".../v2/payments" \
-H "X-Merchant-Id: b955db5e-aef2-47de-bbb9-c80b9cc16e8f" \
-d '{ "merchantTransactionId": "order-123", "amount": 15000, ... }'
Response: 202 Accepted
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchantTransactionId": "order-123",
"status": "INITIATED"
}
}
Retry (Attempt 2-5) β Same merchantTransactionIdβ
Response: 202 Accepted (returns current state β might be COMPLETED or FAILED by now)
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchantTransactionId": "order-123",
"status": "COMPLETED"
}
}
Attempt 6+ β Retry Limit Exceededβ
Response: 422 Unprocessable Entity
{
"title": "UNPROCESSABLE_ENTITY",
"status": 422,
"detail": "Retry limit exceeded for merchantTransactionId. Please use a new merchantTransactionId."
}