Afterpay via Adyen
This feature is currently a Private Beta release. Contact Chargebee Support to enable Afterpay via Adyen for your live and test sites.
Afterpay is a Buy Now, Pay Later (BNPL) payment method that lets customers split a purchase into installments and pay Afterpay over time.
With Chargebee, you can configure and process Afterpay payments through the Adyen payment gateway. Afterpay is a recurring payment method in Australia and New Zealand, and a one-time payment method in the United States and Canada.
Supported countries and currencies
Afterpay via Adyen supports the following countries and currencies. Whether Afterpay can be saved for recurring payments depends on the currency.
| Country | Currency | Payment type |
|---|---|---|
| Australia | AUD | Recurring and one-time |
| New Zealand | NZD | Recurring and one-time |
| Canada | CAD | One-time only |
| United States | USD | One-time only (processed by Adyen as Cash App Afterpay) |
Afterpay decides eligibility from the customer's country, so the country of the billing address must match the country of the payment. A mismatch causes the payment to fail.
Payment features and workflows
Adyen confirms the final Afterpay status asynchronously through webhooks.
- Upfront payment — Afterpay pays you the purchase amount upfront and collects the installments from the customer.
- Redirect-based authorization — the customer approves the payment on Afterpay and returns to Chargebee. Adyen then confirms the final status asynchronously through a webhook.
- Transaction initiation — the first payment is customer-present. In AUD and NZD, Chargebee uses the saved Afterpay for later merchant-initiated renewals. In USD and CAD, Afterpay is not saved.
- Capture — Chargebee captures the payment right after Afterpay authorizes it.
- Verification — not applicable. The customer approves the payment on Afterpay. Chargebee doesn't run a separate verification.
- Regulatory requirements — not applicable in Chargebee. Afterpay shows its installment agreement to the customer on the Afterpay page.
- Statement descriptor — not supported. Chargebee doesn't send a statement descriptor to Adyen for Afterpay payments.
- Chargeback management — not supported in Chargebee. Afterpay disputes reach your Adyen account, and Chargebee doesn't process them. Manage them in your Adyen Customer Area.
- Fraud management — not applicable. Afterpay runs its own risk check on the customer before it approves the payment and takes on the fraud risk. Chargebee doesn't send fraud or risk data to Adyen for Afterpay payments.
- Error intelligence — a failed Afterpay payment shows the refusal reason that Adyen returns. Afterpay has no Afterpay-specific error codes. See Error codes and troubleshooting.
- Gateway transaction details — the transaction's id_at_gateway is the Adyen pspReference. See Reconciliation for Afterpay payments.
Where you can use Afterpay
Afterpay behaves differently across Chargebee surfaces and regions. The following table summarizes where customers can pay with Afterpay and whether it's saved.
| Surface | Australia and New Zealand (AUD, NZD) | United States and Canada (USD, CAD) |
|---|---|---|
| Checkout for subscriptions | Yes, including subscriptions with a free trial or a zero-amount first invoice. Afterpay is saved for automatic renewals. | Yes, when one-time payment methods are allowed for subscriptions. Afterpay isn't saved. |
| Checkout one-time | Yes. Afterpay pays the one-time charge and isn't saved. | Yes. Afterpay pays the one-time charge and isn't saved. |
| Customer portal | Customers can't add Afterpay as a new payment method. A saved Afterpay appears in the customer's payment methods, where the customer can set it as the primary or backup payment method. | Customers can't add Afterpay as a payment method. |
| Pay Now or Collect Now | Yes, as a one-time payment that isn't saved. A saved Afterpay is offered only when paying a single subscription invoice. | Yes, as a one-time payment that isn't saved. |
| Renewals | Automatic. | Not supported, because Afterpay isn't saved. |
Refunds for Afterpay payments
You can issue full and partial refunds for an Afterpay payment from Chargebee.
Prerequisites
To accept Afterpay payments, meet the following conditions:
- You have the Adyen payment gateway configured in Chargebee, with webhooks enabled. Webhooks are mandatory because Adyen confirms the Afterpay payment status asynchronously.
- Afterpay is added as a payment method in your Adyen Customer Area. Learn more.
- To accept Afterpay in the United States, Cash App Afterpay is also added in your Adyen Customer Area. Adyen offers Afterpay for USD as a separate payment method named Cash App Afterpay. Learn more.
- At least one supported currency — AUD, NZD, CAD, or USD — is enabled for your Chargebee site.
- For recurring subscriptions in AUD or NZD, RECURRING_CONTRACT notifications are enabled in your Adyen Customer Area, as described in the Adyen prerequisites.
- Your checkout collects the customer's first and last name, email address, and complete billing address, including the state or province for the United States, Canada, and Australia. A phone number is optional. If you use Chargebee Hosted Pages, make First Name and Last Name mandatory and show the address fields, as described in Additional Configuration.
Integration options
You can integrate Afterpay via Adyen using the following methods:
| Integration method | Description |
|---|---|
| In-App Checkout | Customers pay with Afterpay in Chargebee's In-App Checkout. |
| Full-Page Checkout | Customers pay with Afterpay in Chargebee's Full-Page Checkout. |
| Chargebee.js | Embed Afterpay as a payment method in your custom checkout using Chargebee.js. |
| Payment Components | Customers pay with Afterpay in Chargebee Payment Components embedded in your checkout. |
| API (Permanent Token and Payment Intent) | Process Afterpay payments using Chargebee APIs for a fully custom checkout and payment flow. |
Supported token formats
This integration supports the following set of tokens:
| Token | Description | Format and Sample |
|---|---|---|
| Permanent Token | A permanent token is the payment method ID available at the gateway. For Afterpay via Adyen, it applies only to Afterpay saved in AUD or NZD. | Format: payment_method[reference_id]. Sample: shopper_reference_id/recurring_detail_reference_id |
| Chargebee Payment Intent ID | This is the Payment Intent ID returned after a successful authorization using Chargebee.js. It applies to all supported countries. | Format: payment_intent[id] |
Configure Afterpay via Adyen in Chargebee
Chargebee labels this method AfterPay on the gateway settings page and in Smart Routing. Checkout shows Afterpay.
Follow these steps to configure Afterpay via Adyen in your Chargebee site:
- Log in to the Chargebee app.
- Go to Settings > Configure Chargebee > Payment Gateways.
- Select the relevant Adyen instance from the list.
- Turn on AfterPay.
- Click Apply to save your changes.
Configure Smart Routing for Afterpay
After you turn on Afterpay, follow these steps to configure Smart Routing for it:
- Go to Settings > Configure Chargebee > Payment Gateways.
- Click Manage Rules under Smart Routing.
- Under For AfterPay, a row appears for each currency enabled on your site (AUD, NZD, CAD, or USD). Click Add a gateway when no gateway is assigned. When a gateway is already assigned, click the edit icon.
- Select your Adyen instance from the Choose a payment gateway dropdown, and then click Save.
Enable Afterpay to pay for subscriptions in the United States and Canada
In USD and CAD, Afterpay is a one-time payment method and can't be used for automatic subscription renewals. To let customers pay the first subscription invoice at checkout with Afterpay in these currencies, allow one-time payment methods for subscriptions on your Chargebee site. You don't need this setting for AUD and NZD, where Chargebee saves Afterpay for renewals.
Follow these steps to enable one-time payment methods for subscriptions:
- In the Chargebee app, go to Settings > Configure Chargebee > Checkout & Self-Serve Portal.
- Select the Configuration tab, and then turn on Allow customers to pay for subscriptions with payment methods that only support one-time payments.
After you enable this setting, Afterpay appears on subscription checkouts in USD and CAD. Customers pay renewal invoices through Pay Now or with another saved payment method.
Configure webhook notifications for Afterpay
Afterpay via Adyen confirms payment status asynchronously. Configure Adyen webhooks in Chargebee before you accept live Afterpay payments. Follow the webhook setup steps in Configure Webhook Notifications on the Adyen payment gateway page. For AUD and NZD renewals, RECURRING_CONTRACT must be enabled in the Adyen Customer Area, as described in Prerequisites.
Checkout flow with Afterpay
When a customer selects Afterpay in Chargebee's checkout, the payment flow is as follows:
- The customer clicks Proceed to Checkout to start a purchase.
- The customer enters their first and last name, email address, and billing address, including the postal code. For a billing address in the United States, Canada, or Australia, the customer also enters the state or province.
- On the Add your payment details page, the customer selects Afterpay, and then clicks Next.
- On the Complete your order page, the customer clicks the pay button. The button includes the order total, for example Pay $550.00 & subscribe.
- On the Afterpay page, the customer signs in to Afterpay or creates an Afterpay account, reviews the installment schedule, and then clicks Confirm. For a subscription in Australia or New Zealand, the customer also approves saving Afterpay for future payments.
- After confirmation, Chargebee shows its thank-you page. If you set a redirect URL on the plan, Chargebee sends the customer there instead. Adyen confirms the final payment status asynchronously, so check the transaction before you treat the payment as successful.
Chargebee can't process an Afterpay payment without the customer's first and last name and email address. Make sure the billing address is complete and accurate, including the postal code and, for the United States, Canada, and Australia, the state or province.
Recurring payments with Afterpay in Australia and New Zealand
After Afterpay is saved during checkout, Chargebee processes renewals automatically:
- Renewals are charged on the subscription's due date without any customer action.
- For a subscription with a free trial, the first charge is made when the trial ends and the subscription renews.
- No redirect or reapproval is required after the customer approves Afterpay at checkout.
- If a customer has multiple subscriptions paid with Afterpay, each renews on its own schedule.
Recurring payment restrictions for Afterpay
Confirm the following before you offer Afterpay for subscriptions:
- Saving Afterpay — You can't save Afterpay as a payment method on its own. The customer saves Afterpay at checkout, either while paying the first invoice or, for a subscription with a free trial or a zero-amount first invoice, by approving Afterpay without being charged.
- Currency — A saved Afterpay can pay only charges in AUD or NZD. Chargebee doesn't offer a saved Afterpay for a charge in USD or CAD.
Review Afterpay payments
To review an Afterpay transaction:
- In your Chargebee site, go to Logs > Transactions.
- Select the transaction to open its details.
Test Afterpay via Adyen
Sandbox testing for Afterpay
Test Afterpay on your Chargebee test site with the Adyen test environment. Chargebee doesn't issue Afterpay test credentials. To pay with Afterpay in test mode, you need a test shopper account in the Afterpay sandbox. Afterpay accounts are country-specific, so create a separate test shopper account for each country you test.
Follow these steps to create an Afterpay test shopper account:
- Go to the Afterpay sandbox portal.
- Enter a real email address, and then click Continue. Afterpay sends payment confirmations to this address.
- Select the country you want to test from the dropdown: Australia, New Zealand, US, or Canada.
- Enter a mobile number in the correct format for that country, and then click Continue.
- When Afterpay asks for the SMS verification code, enter
111111. - Complete the profile, accept the terms and conditions, and then click Continue.
- Add a test card to the test shopper account. Use the card details from the Adyen Afterpay testing guide, with CVV
000to simulate an approved payment or CVV051to simulate a refused payment.
Follow these steps to run a sandbox test:
- Confirm that Afterpay is enabled in your Adyen test Customer Area and in your Chargebee test site, and that Adyen webhooks point to your test site. To test USD, also confirm that Cash App Afterpay is enabled in your Adyen test Customer Area.
- Start a checkout in a supported currency, with a billing address in the matching country: AUD with Australia, NZD with New Zealand, CAD with Canada, or USD with the United States.
- On the Afterpay page, sign in with the test shopper account for that country, and then confirm the payment.
- Check the payment status in your Adyen test Customer Area under Payments > Payment list, and confirm the transaction in your Chargebee test site.
Keep the following points in mind while testing:
- A test shopper account works only for the country it was created in. Afterpay doesn't let a shopper sign in with an account from a different country than the billing address.
- To test recurring payments and renewals, use AUD or NZD.
- The redirect flow is the same in test and live. In both modes, Adyen confirms the final status through a webhook, so a test isn't complete until Chargebee receives it.
Production testing for Afterpay
Before going live:
- Submit a request for Afterpay in your live Adyen Customer Area. To accept USD, also submit a request for Cash App Afterpay.
- Turn on AfterPay in your live Chargebee site, and map it to your live Adyen instance in Smart Routing.
- Verify webhook configuration is complete (mandatory for payment status updates).
- Confirm that RECURRING_CONTRACT notifications are enabled in your live Adyen Customer Area if you plan to use Afterpay for subscriptions in AUD or NZD.
- Confirm that one-time payment methods are allowed for subscriptions if you plan to accept Afterpay on subscription checkouts in USD or CAD.
- Perform end-to-end testing for a one-time payment, and for a subscription renewal in AUD or NZD.
Reconciliation for Afterpay payments
For financial reconciliation between Chargebee and Adyen:
- Use the Chargebee transaction field id_at_gateway, which maps to the pspReference in Adyen.
Follow these steps to reconcile transactions:
- Retrieve the id_at_gateway value from the Chargebee transaction details.
- Locate the corresponding pspReference in Adyen reports for Afterpay transactions.
- Match transactions using this reference to ensure financial consistency.
Error codes and troubleshooting
Afterpay via Adyen has no Afterpay-specific error codes. When a payment fails, open the transaction in Chargebee to see the refusal reason that Adyen returned.
The following table lists common reasons why an Afterpay payment fails or Afterpay isn't offered, and how to resolve each one. For how Chargebee classifies payment failures, see Payment errors.
| Issue | Cause | Resolution |
|---|---|---|
| The payment fails before or after the redirect to Afterpay | The customer's first or last name, email address, or part of the billing address is missing. Afterpay needs the street, city, postal code, and country, plus the state or province for the United States, Canada, and Australia. | Make these fields mandatory in your checkout, or pass them in your API request. |
| The payment fails because of the customer's country | The country of the billing address doesn't match the country of the payment. | Make sure the billing address is in the country that matches the currency of the payment. |
| A saved Afterpay isn't offered at checkout or in Pay Now | The charge is in USD or CAD, or Pay Now includes more than one invoice or a non-subscription invoice. | The customer can pay with a new Afterpay as a one-time payment, or with another payment method. |
| You can't sign in to Afterpay with a sandbox test shopper account | The test shopper account was created for a different country than the billing address. | Sign in with a test shopper account created for the country of the billing address. See Sandbox testing for Afterpay. |
Limitations and important points
Keep the following limitations in mind when offering Afterpay via Adyen:
- Afterpay via Adyen supports the AUD, NZD, CAD, and USD currencies only.
- Afterpay is saved for automatic renewals only in AUD and NZD. In USD and CAD, Afterpay appears on subscription checkouts only when Allow customers to pay for subscriptions with payment methods that only support one-time payments is enabled.
- Customers can't add Afterpay from the customer portal. Afterpay is saved only when a customer completes checkout in AUD or NZD.
- The country of the billing address must match the currency of the payment: Australia for AUD, New Zealand for NZD, Canada for CAD, and the United States for USD.
- Afterpay charges the customer's first installment when it authorizes the payment. Chargebee captures the payment right after authorization, so you don't need to capture it yourself. An Afterpay payment that isn't captured within 13 days is canceled, and Afterpay refunds the first installment.