Payment retries
Discover how the payment retry service helps recover failed Pix payments.
This service allows merchants to retry payments that weren’t approved on the first attempt (e.g., due to insufficient funds) and successfully collect the payment later.
Example request
To see all available options, scroll horizontally in the header section.
curl -X POST \
-H 'X-Date: {X-Date}' \
-H 'X-Login: {X-Login}' \
-H 'X-Trans-Key: {X-Trans-Key}' \
-H 'Content-Type: application/json' \
-H 'X-Version: 2.1' \
-H 'User-Agent: MerchantTest / 1.0 ' \
-H 'Authorization: V2-HMAC-SHA256, Signature: {Signature}' \
-d '{body}'
https://api.dlocal.com/payments/D-4-41f8628f-b6ec-4c02-96d5-c5b03cac7cb0/retries
{
"notification_url": "http://merchantsite.com/retry_notifications"
}
{
"id": "D-4-41f8628f-b6ec-4c02-96d5-c5b03cac7cz0",
"amount": 588,
"currency": "BRL",
"payment_method_id": "XA",
"payment_method_type": "TICKET",
"payment_method_flow": "DIRECT",
"country": "BR",
"created_date": "2025-01-01T20:37:20.000+0000",
"status": "PENDING",
"status_detail": "The payment is pending",
"status_code": "100",
"retry": {
"remaining_attempts": "2",
"last_attemptable_date": "2025-01-07T02:59:00.000+0000""
},
"order_id": "5346523569",
"notification_url": "http://merchantsite.com/retry_notifications"
}
{
"id": "D-4-41f8628f-b6ec-4c02-96d5-c5b03cac7cz0",
"amount": 588,
"currency": "BRL",
"payment_method_id": "XA",
"payment_method_type": "TICKET",
"payment_method_flow": "DIRECT",
"country": "BR",
"created_date": "2025-01-01T20:37:20.000+0000",
"status": "PAID",
"status_detail": "The payment is paid.",
"status_code": "200",
"enrollment": {
"id": "E-4-32e1218f-b6ec-3f21-13d5-50v12ere2ca3",
"external_id": "31231jj223"
},
"order_id": "5346523569",
"notification_url": "http://merchantsite.com/retry_notifications"
}
{
"id": "D-4-41f8628f-b6ec-4c02-96d5-c5b03cac7cz0",
"amount": 588,
"currency": "BRL",
"payment_method_id": "XA",
"payment_method_type": "TICKET",
"payment_method_flow": "DIRECT",
"country": "BR",
"created_date": "2025-01-01T20:37:20.000+0000",
"status": "PENDING",
"status_detail": "The payment is pending, attempt failed.",
"status_code": "102",
"retry": {
"remaining_attempts": "2",
"last_attemptable_date": "2025-01-07T02:59:00.000+0000"
},
"enrollment": {
"id": "E-4-32e1218f-b6ec-3f21-13d5-50v12ere2ca3",
"external_id": "31231jj223"
},
"order_id": "5346523569",",
"notification_url": "http://merchantsite.com/retry_notifications"
}
{
"id": "D-4-41f8628f-b6ec-4c02-96d5-c5b03cac7cz0",
"amount": 588,
"currency": "BRL",
"payment_method_id": "XA",
"payment_method_type": "TICKET",
"payment_method_flow": "DIRECT",
"country": "BR",
"created_date": "2025-01-01T20:37:20.000+0000",
"status": "REJECTED",
"status_detail": "The payment is rejected",
"status_code": "300",
"retry": {
"remaining_attempts": "0",
"last_attemptable_date": ""
},
"enrollment": {
"id": "E-4-32e1218f-b6ec-3f21-13d5-50v12ere2ca3",
"external_id": "31231jj223",
},
"order_id": "5346523569",
"notification_url": "http://merchantsite.com/retry_notifications"
}
View the complete list of enrollment status codes.
Response params
Field | Type | Description |
---|---|---|
Retry object | ||
allowed_retries | Number (2,0) | Indicates the number of retries available for this payment. It only applies to certain payment methods, such as Pix Automático (payment_method_id=XA ), and to payments with status code 102: The payment is pending, attempt failed. |
last_attemptable_date | Date (ISO_8601) | Last attemptable date to request a payment retry. |
Updated 7 days ago