Setup
Please follow the common dLocal instructions to get set up with PIX. Next, make sure to enable PIX as a payment method on your configured account.Features
- Tokenization - Save payment methods for future use
- Partial refunds - Refund a portion of the captured amount
- Refunds - Full refund support
- Settlement reporting - Access to settlement reports
- Transaction sync - Automatic transaction status synchronization
Supported countries
dLocal supports transactions from buyers inBR.
Supported currencies
dLocal supports processing payments inBRL.
Limitations
- Capture - Delayed capture is not supported
- Delete tokens - Token deletion is not supported
- Void - Transaction void is not supported
Integration
For PIX, the default integration is through a redirect to a hosted payments page. Start by creating a new transaction with the following required fields.payment_method.approval_url and the status is set to buyer_approval_pending.
Redirect the buyer to the approval_url so they can complete the payment. After approval the buyer is redirected to the redirect_url you provided when creating the transaction. Do not rely solely on the redirect - either poll the transaction or (recommended) rely on webhooks to detect the final status (for example capture_succeeded or failure states).
Recurring transactions
Enrollment
To enroll a buyer in Pix Automático, create an initial payment with tokenization enabled and passdlocal-pix connection options.
- Set
storetotrueto save the payment method. - Pass
connection_options.dlocal-pix.subscriptionwith the recurring enrollment details.
approval_url to complete the Pix Automático enrollment. Once the buyer approves it, the payment method is saved and available for subsequent recurring charges.
Subsequent payment
After enrollment succeeds, create subsequent charges with the saved payment method ID.- Set
payment_method.methodtoidand pass the saved payment method ID. - Set
payment_sourcetorecurring. - Set
merchant_initiatedandis_subsequent_paymenttotrue. - Optionally set
connection_options.dlocal-pix.scheduled_dateinYYYY-MM-DDformat.
Connection options
subscription.frequency- Recurrence interval. Supported values areWEEKLY,MONTHLY,QUARTERLY,SEMI_ANNUAL, andANNUAL.subscription.amount.type- Amount model. UseFIXEDfor a fixed amount orVARIABLEfor a variable amount.subscription.amount.value- Fixed amount in local currency. Use this whensubscription.amount.typeisFIXED.subscription.amount.min_value- Minimum enrollment limit in local currency. Use this whensubscription.amount.typeisVARIABLE.subscription.start_date- Subscription start date inYYYY-MM-DDformat.subscription.end_date- Subscription end date inYYYY-MM-DDformat.
connection_options.dlocal-pix.scheduled_date in YYYY-MM-DD format. If you omit it, dLocal defaults to 2 days in the future.
Sandbox testing
In production, Gr4vy passesmerchant_reference to dLocal as the payment description.
In sandbox, Gr4vy sends 100:approved as the payment description so dLocal can return an approved transaction.