Recurring payments
Learn how to integrate Pix Automático for seamless recurring payments with dLocal.
After the one-time authorization by the user, the merchant will use this service to execute recurring payments by sending the enrollment_id
provided by dLocal, which identifies the subscription approved by the user for the merchant.
Pix payments will be processed according to the subscription configurations, including frequency, amounts, and other parameters, without requiring further intervention from the user. If a payment is rejected on the first attempt (e.g., due to insufficient funds), the merchant can retry it using the retry service.
Request example
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
{
"amount": 588,
"currency": "BRL",
"country": "BR",
"payment_method_id": "XA",
"payment_method_flow": "DIRECT",
"payer": {
"name": "Thiago Gabriel",
"document": "53033315550",
"email": "thiago@email.com"
},
"enrollment": {
"id": "E-4-32e1218f-b6ec-3f21-13d5-50v12ere2ca3"
},
"order_id": "5346523566",
"notification_url": "http://www.merchantsite.com/notifications"
}
{
"id": "D-4-41f8628f-b6ec-4c02-96d5-c5b03cac7cb0",
"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",
"order_id": "5346523566",
"notification_url": "http://merchantsite.com/notifications"
}
Updated 7 days ago