Introducing the Chargebee CLI

Pix via Adyen

This feature is a Private Beta release. Contact Chargebee Support to enable Pix via Adyen for your live and test sites.

Pix is Brazil's instant payment system, operated by the Central Bank of Brazil. Chargebee supports Pix as a payment method through the Adyen payment gateway, for one-time payments and for subscriptions through Pix Automático.

When customers select Pix at checkout, they scan a Pix QR code or paste a Pix code in their banking app to pay. For a subscription, the same approval sets up a Pix Automático authorization for renewal payments. Payment status is confirmed through Adyen webhooks.

Pix via Adyen is a subscription-based payment method: Chargebee charges a saved Pix Automático authorization only for invoices of the subscription it was set up for.

Supported countries and currencies

Pix via Adyen supports the following country and currency:

CountryCurrency
BrazilBRL (Brazilian Real)

Payment features

The following features are available for Pix via Adyen:

FeatureDescriptionSupportedDefault stateConfiguration or behavior
Integration sync modeDefines how payment requests are processed and statuses are communicated between Chargebee and Adyen.Yes (asynchronous)AsynchronousAdyen processes Pix payments asynchronously. For a one-time payment, Chargebee receives the final status through the AUTHORISATION webhook. For a Pix Automático renewal, AUTHORISATION confirms that the debit is scheduled, and CAPTURE or EXPIRE reports the outcome after the billing date. Webhook configuration is mandatory.
Capture settingsPayment processing involves two stages: authorization and capture. Capture settings determine when funds are collected after authorization.YesAuto captureAuto capture is the only supported capture setting for Pix via Adyen. No additional configuration is required.
Verification modesDefines how payment methods are verified before processing.YesEnabledThe customer approves the payment and, for a subscription, the Pix Automático authorization in their bank or payment app. No separate verification configuration is required in Chargebee.
Regulatory requirementsRules set by the payment scheme or local regulation.YesEnabledThe customer must provide their CPF or CNPJ (Brazilian tax ID). Pix Automático follows the Central Bank of Brazil rules for scheduling and retrying recurring debits.
Statement descriptorDisplays the business name on the customer's bank statement, helping them recognize charges and reducing disputes.NoNot applicableNot applicable to Pix via Adyen.
Chargeback managementHandles chargeback events and applies configured actions on invoices and subscriptions.NoNot applicableChargebee doesn't manage disputes for Pix via Adyen. Issue refunds when needed.
Fraud managementUses gateway fraud signals to identify and flag high-risk transactions.NoNot applicableNo Pix-specific fraud configuration is available in Chargebee.
Transaction initiation typeIdentifies whether a transaction is customer-initiated (CIT) or merchant-initiated (MIT).YesSupportedThe checkout payment is customer-initiated. Renewal payments are Merchant Initiated Transactions (MIT) collected through the saved Pix Automático authorization.
Error intelligenceProvides standardized categorization of payment failures.YesEnabledAvailable through Adyen payment and refusal responses. No configuration is required.
Gateway transaction detailsProvides access to raw gateway responses for transactions.YesEnabledAvailable on the transaction page under Error details. No configuration is required.
Adding payment methods in the Chargebee dashboardAllows a payment method to be added in Chargebee when details are collected outside checkout.NoNot applicableCustomers must complete the Pix checkout flow. Pix can't be added from the Chargebee dashboard.

Prerequisites

Before you set up Pix via Adyen in Chargebee, make sure that:

  • The Adyen payment gateway is configured in your Chargebee site, including webhook notifications.
  • Pix is added as a payment method for your merchant account in the Adyen Customer Area. To collect recurring payments, Pix Automático must also be enabled for the merchant account. Learn more
  • Your business has a local entity in Brazil. Adyen requires a local entity to accept Pix payments.
  • BRL (Brazilian Real) is enabled as a currency in your Chargebee site.
  • Your customers have a Brazilian bank account that supports Pix, and a CPF or CNPJ.

Integration options

You can integrate Pix via Adyen using the following methods:

Integration methodDescription
Chargebee Hosted PagesAccept Pix payments using Chargebee's hosted checkout pages with minimal integration effort.
Chargebee.jsEmbed Pix as a payment method in your custom checkout using Chargebee.js.
API (Payment Intent)Process Pix payments using Chargebee APIs for a fully custom checkout and payment flow.

Supported token formats

This section is relevant if you're building a custom checkout.

Token typeDescriptionSupportedToken fieldToken format
Chargebee Payment IntentRecommended token format when building a custom checkout using Chargebee.js.Yespayment_intent[id]payment_intent_id
Chargebee tokenLegacy token format supported for selected payment methods and gateways with Chargebee.js. Not recommended for new implementations.Notoken_idNot applicable
Gateway permanent tokenPermanent reference provided by Adyen for a saved Pix Automático authorization and used for renewal payments.Yespayment_method[reference_id]shopper_reference_id/recurring_detail_reference_id
Gateway temporary tokenShort-lived token format that can be converted to a permanent token.NoNot applicableNot applicable

Configure in Chargebee

Follow these steps to enable Pix via Adyen in your Chargebee site:

  1. Log in to the Chargebee app.
  2. Go to Settings > Configure Chargebee > Payment Gateways.
  3. Select the relevant Adyen instance from the list.
  4. On the Configure Adyen page, turn on Pix under the supported payment methods.
  5. Click Apply to save your changes.

Configure Smart Routing

When you turn on Pix for an Adyen instance, Smart Routing for Pix payments in BRL is set to that instance automatically. If another gateway already handles Pix payments in BRL, update the rule manually:

  1. Log in to the Chargebee app.
  2. Go to Settings > Configure Chargebee > Payment Gateways.
  3. Click Manage Rules under Smart Routing.
  4. Go to the Pix section and click Add a Gateway for BRL. If a payment gateway is already assigned, click Edit.
  5. From the Choose a payment gateway dropdown, select the Adyen instance with Pix turned on.
  6. Click Save.

Configure webhook notifications

Chargebee relies on Adyen webhooks to receive the status of Pix payments, Pix Automático authorizations, and refunds. Pix via Adyen needs two webhooks in the Adyen Customer Area:

  • Standard webhook: Configure it as described in Configure webhook notifications for Adyen. Chargebee uses the AUTHORISATION, CAPTURE, EXPIRE, REFUND, and REFUND_FAILED events for Pix.
  • Recurring tokens life cycle events webhook: Adyen sends the saved Pix Automático authorization only through this webhook, so it's required for recurring payments. Chargebee uses the recurring.token.created event to save the authorization and the recurring.token.disabled event to learn that it was canceled.

Follow these steps to add the recurring tokens webhook:

  1. Log in to your Adyen Customer Area.
  2. Go to Developers > Webhooks and click + Webhook.
  3. Select Recurring tokens life cycle events from the list of webhooks and click Add.
  4. In the URL field, enter the same Chargebee notification URL that you use for the Standard webhook.
  5. Under Security > Basic authentication, enter the same username and password that you use for the Standard webhook.
  6. Click Save changes.

Checkout flow

Your customer completes the following steps at checkout when paying with Pix via Adyen:

  1. The customer proceeds to the payment step of the checkout and selects Pix.
  2. The customer enters their CPF or CNPJ and completes the order.
  3. Chargebee displays the Pix QR code, the Pix copy-and-paste code, and a countdown. The QR code is valid for 15 minutes.
  4. The customer scans the QR code or pastes the code in their bank or payment app, and approves the payment. For a subscription, the customer also approves the Pix Automático authorization in the same step.
  5. After Adyen confirms the payment, the QR code closes and the order confirmation page appears.

Recurring payments

Pix via Adyen supports recurring subscription payments through Pix Automático. The customer approves a Pix Automático authorization for the subscription at checkout, and Chargebee uses it to collect renewal payments as Merchant Initiated Transactions (MIT), without asking the customer to scan a new QR code.

Set up a subscription with a trial

When the subscription starts with a free trial and nothing is due at checkout, the customer approves the Pix Automático authorization without paying anything. Chargebee collects the first payment through the authorization when the trial ends.

Billing frequencies

Pix Automático supports subscriptions billed weekly, monthly, quarterly, half-yearly, or yearly. Plans with other billing frequencies, such as every two weeks or every two months, can't use Pix Automático.

Renewal payment timing

Pix Automático debits are scheduled in advance. Adyen requires each renewal debit to be scheduled 2 to 10 days before the date on which the customer's bank debits the account. The renewal transaction stays In Progress in Chargebee until Adyen confirms the outcome on the billing date.

Dunning

If a Pix Automático renewal isn't collected, Chargebee retries it through real-time payments dunning. Adyen allows up to three retries for a failed Pix Automático debit. Each retry must be scheduled at least 24 hours after the retry request and within seven days of the original billing date.

To configure how Chargebee retries Pix renewals and what happens when the dunning period ends:

  1. Log in to the Chargebee app.
  2. Go to Settings > Configure Chargebee > Dunning for Online Payments.
  3. In the Dunning for Real Time payments section, go to PIX and turn on Dunning.
  4. Select the final actions for invoices and subscriptions when the dunning period ends.

See Dunning for more about dunning settings.

Test in sandbox

Use your Adyen test merchant account with Pix enabled, and a Chargebee test site with the Adyen test instance configured.

  • Use the test CPF 01234567890 from Adyen's test data.
  • The QR code generated in the Adyen test environment can't be scanned with a real bank app. To complete a test payment, go to Payments > Offers in the Adyen test Customer Area, select the payment by its PSP reference, and click Promote this offer to a sale. Adyen then sends the AUTHORISATION webhook to Chargebee.
  • Make sure both the Standard webhook and the Recurring tokens life cycle events webhook are configured for the test merchant account.

Refer to Adyen's Pix documentation for more test scenarios.

Test in production

Before you go live:

  • Make sure Pix is enabled for your live Adyen merchant account and, for recurring payments, that Pix Automático is also enabled.
  • Verify that the Standard webhook and the Recurring tokens life cycle events webhook are configured for the live merchant account.
  • Run an end-to-end test with a real Brazilian bank account that supports Pix, including a subscription checkout that sets up a Pix Automático authorization.

Reconcile transactions

For financial reconciliation between Chargebee and Adyen, use the Chargebee transaction field id_at_gateway, which maps to the Adyen pspReference.

  1. Retrieve the id_at_gateway value from the Chargebee transaction details.
  2. Locate the corresponding pspReference in your Adyen reports.
  3. Match the transactions using this reference.

A Pix Automático renewal stays In Progress in Chargebee until Adyen confirms the debit on the billing date, so reconcile renewals after the billing date.

Error codes and troubleshooting

Adyen returns refusal reasons for failed Pix payments, and Chargebee shows them on the transaction page under Error details. For gateway error handling in Chargebee, see Payment errors.

Frequently Asked Questions (FAQs)

Can I refund a Pix payment?

Yes. You can issue full and partial refunds within 90 days of the payment. Refunds are asynchronous: the refund stays in progress until Adyen confirms it through the REFUND webhook. If the refund fails later, Adyen sends REFUND_FAILED, and Chargebee marks the refund as failed.

Can a customer use a saved Pix Automático authorization to pay another subscription?

No. A Pix Automático authorization is tied to the subscription it was set up for. Chargebee charges it only for invoices of that subscription, and charges invoices of other subscriptions to the customer's backup payment method. See Subscription-based payment methods.

Limitations and important points

  • Pix via Adyen is available only for BRL (Brazilian Real) transactions and customers with a Brazilian bank account.
  • The customer must provide their CPF or CNPJ at checkout.
  • A saved Pix Automático authorization is charged only for invoices of the subscription it was set up for. Invoices for one-time charges and invoices of other subscriptions are charged to the customer's backup payment method.
  • Pix can't be added through the Customer Portal or the Chargebee app. Customers must complete the Pix checkout flow.
  • A Pix Automático authorization can't be changed after the customer approves it. If you change the subscription's billing frequency, the customer must approve a new authorization.
  • Refunds are available within 90 days of the payment.