Pix via dLocal
Pix is a popular real-time payment method in Brazil. This integration allows you to accept Pix payments through the dLocal gateway in Chargebee. Pix applies to payments in BRL for customers in Brazil.
Chargebee uses two Pix flows with dLocal:
- Pix (one-time): A single instant payment. The customer scans a QR code or completes payment in their bank app. No reusable mandate is saved for future charges.
- Pix Automático (recurring): A subscription mandate (dLocal enrollment) created with the first payment. It authorizes Chargebee to collect future subscription renewal charges without a new QR code each billing cycle.
Before you begin, ensure that dLocal is configured. See Configure dLocal in Chargebee.
Prerequisites
Before enabling Pix:
- Ensure dLocal is configured in your Chargebee site.
- Turn on Pix on the Configure dLocal page.
- Configure Smart Routing so Pix payments in BRL route to your dLocal gateway.
Configure Pix via dLocal in your Chargebee site
Follow these steps to enable Pix via dLocal:
Pix is available only after dLocal is configured successfully.
- Go to Settings > Configure Chargebee > Payment Gateways > dLocal.
- On the Configure dLocal page, turn on Pix.
- Click Apply to save your changes.
Configure Smart Routing
Route Pix payments in BRL to your dLocal gateway so Chargebee can offer Pix. On the Payment Gateways page:
- Go to Settings > Configure Chargebee > Payment Gateways and click Manage rules under Smart Routing.
- Under For Pix, on the BRL row, click Add a gateway. If a gateway is already set on that row, click the edit icon instead.
- In the Gateway for processing Pix in BRL dialog, select your dLocal gateway instance from the Choose a payment gateway dropdown.
- Click Save. BRL Pix payments then route to that dLocal gateway.
Saving the rule does not move payment methods customers have already added. Those stay linked to their current gateway. Only new payment methods use the updated rule.
When Pix (one-time) and Pix Automático are available
Both flows use the same Pix payment method in Chargebee when dLocal is enabled, Pix is turned on, and Smart Routing sends BRL Pix to dLocal. Chargebee chooses the flow from the checkout context and the payment type sent with the payment attempt.
Pix (one-time)
One-time Pix is used when Chargebee treats the payment as a one-time charge. Typical cases include:
- Pay Now and Collect Now hosted pages.
- One-time checkout hosted pages.
- Custom checkout or API integrations that pass a one-time payment type for the Pix payment attempt.
The customer completes a single Pix payment. Chargebee does not save a Pix Automático enrollment for later merchant-initiated charges.
Pix Automático (recurring)
Pix Automático is used when the payment is tied to a subscription billing plan and Chargebee sends a recurring payment type. Typical cases include:
- Subscription checkout (hosted checkout or quote acceptance) for a BRL plan.
- Chargebee Self-Serve Portal, when the customer updates the payment method on a specific subscription. Pix is hidden when the portal page is not tied to a subscription.
- A Request Payment Method link sent from a subscription. A Request Payment Method link sent from the customer record has no subscription, so Pix is not offered.
- Recurring invoices for the subscription that created the mandate.
The first payment creates a dLocal enrollment (mandate) that carries the plan's billing frequency. Chargebee stores the enrollment on that subscription and uses it for later recurring invoices.
Pix is not offered on the standalone customer-level Update Payment Method hosted page, because Pix Automático requires subscription context. See Why is Pix not available on the standalone Update Payment Method hosted page?.
On hosted checkout for a plan, Chargebee does not offer Pix when the plan is billed every 1–6 days. A week is the shortest cycle Pix Automático can represent. Pix remains available for a plan billed every 7 days, every week, every month, or longer. One-time checkout has no plan term, so this limit does not apply there.
Pix Automático mandate restrictions
A Pix Automático mandate is opened for one subscription and its billing plan. Treat it as a subscription-scoped agreement, not a general customer wallet.
- Subscription renewals only. Chargebee uses the saved mandate to collect recurring charges for the subscription that created it. It does not use that mandate to auto-collect ad-hoc or non-recurring invoices, including one-off invoices raised at the customer level without subscription context.
- One subscription per mandate. Auto collection for a renewal invoice belonging to another subscription does not use a Pix mandate that belongs to a different subscription.
- One debit schedule per billing cycle. Pix Automático allows one scheduled debit per mandate per billing cycle. Chargebee enforces that limit by not using the mandate on a non-recurring invoice.
One-time Pix payments do not leave a reusable mandate. Only Pix Automático enrollment creates a saved Pix payment source for renewals.
The enrollment sends dLocal a minimum authorization limit (min_value). In the bank app, the customer sets the maximum amount Chargebee can collect in a billing cycle, and that maximum cannot be lower than this limit. It is not a minimum debit. Chargebee sets the limit to R$10.00 unless Chargebee Support has set a different floor for the site. The limit is not the subscription price, and Configure dLocal has no control for it. Chargebee can collect any amount from zero up to the maximum the customer set. A renewal above that maximum is outside the authorization.
How Pix works
Pix is a real-time payment method that customers complete using their banking app.
- During checkout, customers are shown a QR code or payment key.
- Customers complete the payment using their bank app.
- dLocal processes the payment asynchronously.
- Chargebee updates the payment status after receiving webhook notifications.
Pix payments are asynchronous. A payment remains in a pending state until Chargebee receives the final status from dLocal via webhooks.
Payment features
The following table describes supported features and behavior for Pix via dLocal:
| Feature | Description | Supported | Default state | Configuration / behavior |
|---|---|---|---|---|
| Recurring payments (Pix Automático) | Collect subscription renewals using a mandate created at checkout or subscription-level payment method update. | Yes | Enabled on subscription flows | Requires a recurring payment attempt with subscription billing frequency. Creates a dLocal enrollment saved on the subscription. Not used for one-time Pix or for a non-recurring invoice. |
| Integration sync mode | Defines how payment requests are processed and how statuses are updated. | Yes (asynchronous only) | Asynchronous | dLocal processes Pix payments asynchronously. Chargebee receives the final status through webhooks. |
| Capture settings | Defines when funds are captured after authorization. | Yes | Auto capture | No configuration required. Auto capture is the only supported option. |
| Verification modes | Defines how payment methods are validated before payment. | No | Enabled | Validation occurs in the background. Payments are still initiated. |
| Regulatory requirements support | NA | NA | NA | NA |
| Statement descriptor | Business name shown in the customer’s bank statement. | Yes | Disabled | Configure under Settings > Configure Chargebee > Transaction Descriptor. |
| Chargeback management | Handles disputes and chargebacks. | No | Disabled | Not supported. |
| Fraud management | Identifies high-risk transactions. | No | NA | Not supported. |
| Transaction initiation type | Indicates whether the transaction is customer-initiated or merchant-initiated. | Yes (Pix Automático renewals) | Supported on subscription flows | The first Pix Automático payment is customer-initiated when the customer completes checkout or authorizes the mandate. Subsequent subscription renewal charges are merchant-initiated using the saved dLocal enrollment. One-time Pix remains customer-initiated only. |
| Error intelligence | Provides standardized failure categorization. | Yes | NA | No configuration required. |
| Gateway transaction details | Provides raw gateway responses. | Yes | Enabled | Available under Error details on the transaction page. |
| Addition of payment methods in Chargebee dashboard | Add payment methods collected outside Chargebee. | Yes | Enabled | Use the Create payment source using permanent token API. |
Supported token formats
Use the following token formats when building a custom checkout or migrating from another provider:
| Token type | Description | Supported | Token field | Token format |
|---|---|---|---|---|
| Chargebee Payment Intent | Recommended for custom checkout using Chargebee JS. | Yes | payment_intent[id] | payment_intent_id |
| Chargebee token | Legacy format. Not recommended for new integrations. | No | token_id | NA |
| Gateway permanent token | Used for recurring payments or migrations. | Yes | payment_method[reference_id] | mandate_id |
| Gateway temporary token | Short-lived token convertible to permanent token. | No | NA | NA |
Testing
Testing in sandbox
dLocal provides the following scenarios:
| Description | dLocal | Amount at Chargebee | Chargebee |
|---|---|---|---|
| 100:approved | Success | 1000 | Transaction succeeds |
| 100:rejected | Failure | 2000 | Transaction fails |
| 302 | Insufficient balance | 3000 | Transaction fails |
You can use the following test document numbers:
CPF: 53033315550
CNPJ: 91980232000109
You can also generate and use any valid CPF or CNPJ numbers online for testing purposes.
Reference: Pix Testing Environment.
If you use amounts not listed above, dLocal does not receive a scenario description. These transactions remain in a pending state.
Ensure webhook handling is configured correctly. Payment status updates depend on webhook notifications from dLocal.
Testing in production
Before going live:
- Ensure Pix is configured in both dLocal and Chargebee.
- Perform end-to-end testing using a real Pix-enabled banking app.
Pix payments require real bank interaction for validation in production.
Reconciliation
To reconcile transactions between Chargebee and dLocal:
- Locate the id_at_gateway value in the Chargebee transaction.
- Use this value as the Reference ID in dLocal.
This mapping ensures accurate reconciliation between systems.