Introducing the Chargebee CLI

Touch 'n Go via dLocal

This feature is a Private Beta release. Contact Chargebee Support to enable Touch 'n Go via dLocal for your live and test sites.

Touch 'n Go is a digital wallet in Malaysia that customers use to pay from a stored wallet balance or a linked funding source. Chargebee supports Touch 'n Go as a payment method through the dLocal payment gateway.

When customers select Touch 'n Go at checkout, they are redirected to Touch 'n Go to approve the payment and authorize an enrollment. The payment is processed asynchronously, and the transaction stays in a pending state until dLocal confirms the final status through a webhook notification. After the initial authorization, Chargebee stores the enrollment returned by dLocal and uses it for merchant-initiated renewal charges.

Supported countries and currencies

Touch 'n Go via dLocal supports the following country and currency. Refer to the dLocal Touch 'n Go documentation for the latest details.

CountryCurrency
MalaysiaMYR

Chargebee always sends Malaysia as the payer country for Touch 'n Go transactions, and rejects a Touch 'n Go payment intent created in any currency other than MYR.

Payment features and workflows

The following table describes the supported features and behavior for Touch 'n Go via dLocal:

FeatureDescriptionSupportedDefault stateConfiguration or behavior
Integration sync modeDefines how payment requests are processed and how statuses are updated.Yes (asynchronous only)AsynchronousdLocal processes Touch 'n Go payments asynchronously. Chargebee receives the final status through webhooks.
Capture settingsDefines when funds are captured after authorization.YesAuto captureNo configuration required. Auto capture is the only supported option. Manual capture is not available for Touch 'n Go.
Verification modesDefines how payment methods are validated before payment.NoNot applicableZero-amount verification is not supported. The customer authorizes the enrollment as part of the first payment, or through a standalone enrollment redirect.
Regulatory requirements supportCompliance requirements for the payment method.Not applicableNot applicableNot applicable
Statement descriptorBusiness name shown in the customer's statement.NoNot applicableChargebee does not send a statement descriptor to dLocal for this method.
Chargeback managementHandles disputes and chargebacks.NoNot applicableNot supported. Wallet payments are approved by the customer in the Touch 'n Go app.
Fraud managementIdentifies high-risk transactions.NoNot applicableNot supported by Chargebee for this method. Risk screening is handled by dLocal and Touch 'n Go.
Transaction initiation typeIndicates whether the transaction is customer-initiated or merchant-initiated.YesCustomer-initiated for the first paymentThe first payment is customer-initiated and requires a redirect. Renewals are merchant-initiated and run against the stored enrollment without a redirect.
Error intelligenceProvides standardized failure categorization.YesEnabledNo configuration required.
Gateway transaction detailsProvides raw gateway responses.YesEnabledAvailable under Error details on the transaction page.
Addition of payment methods in the Chargebee DashboardAdd a payment method outside a checkout.NoNot applicableA merchant cannot add this payment method from the customer record in the Chargebee Dashboard. Use the Create a payment source using permanent token API with the dLocal enrollment ID. The enrollment must already be authorized by the customer.
RefundsReturns funds to the customer's wallet.YesEnabledFull and partial refunds are supported once the payment is settled. A refund against a pending payment fails.
VoidCancels an authorization before capture.NoNot applicableNot supported. Use a refund after the payment settles.

Prerequisites

Ensure the following before configuring Touch 'n Go payments via dLocal:

  1. A dLocal merchant account with Touch 'n Go enabled. Contact the dLocal support team to activate Touch 'n Go for your account.
  2. dLocal is added and configured as a payment gateway in your Chargebee site.
  3. Your Chargebee site is enabled for MYR collections.

Integration options

You can integrate Touch 'n Go via dLocal using the following methods:

Integration methodSupported
Chargebee Checkout

In-app layout of Checkout - Supported

Full Page Checkout - Supported

Chargebee Self-Serve PortalSupported. Customers can add or update Touch 'n Go as a payment method from the customer portal.
Custom Checkout

Payment Components - Supported

Chargebee.js (without Payment Components) - Supported

API (Payment Intent) - Supported

dLocal.js - Not supported

Supported token formats

Use the following token formats when you build a custom checkout or migrate from another provider:

Token typeDescriptionSupportedToken fieldToken format
Chargebee Payment IntentRecommended for a custom checkout built with Chargebee.js or Payment Components.Yespayment_intent[id]payment_intent_id
Chargebee tokenLegacy format. Not recommended for new integrations.NoNot applicableNot applicable
Gateway permanent tokenThe dLocal enrollment ID. Used for recurring payments and migrations.Yespayment_method[reference_id]dLocal enrollment ID
Gateway temporary tokenShort-lived token convertible to a permanent token.NoNot applicableNot applicable

Configure Touch 'n Go in Chargebee

Follow these steps to enable Touch 'n Go in your Chargebee site:

  1. Log in to the Chargebee app.
  2. Go to Settings > Configure Chargebee > Payment Gateways.
  3. Select the relevant dLocal instance from the list.
  4. On the Configure dLocal page, turn on Touch 'n Go in the list of payment methods.
  5. Click Apply to save your changes.

Configure Smart Routing

When you enable Touch 'n Go through dLocal, Chargebee automatically adds a Smart Routing rule that sends MYR transactions to that dLocal instance, as long as MYR is enabled on your site and no Touch 'n Go rule exists for MYR yet. If a rule already points to another gateway, Chargebee does not change it. Edit the rule so that Touch 'n Go transactions route to dLocal.

Follow these steps to modify the Smart Routing settings:

  1. Go to Settings > Configure Chargebee > Payment Gateways.

  2. Click Manage Rules under Smart Routing.

  3. Go to the Touch 'n Go section and click Add a Gateway or Edit for the MYR currency.

  4. Select the dLocal instance that has Touch 'n Go enabled from the Choose a payment gateway drop-down menu.

  5. Click Save.

Configure webhook notifications

Touch 'n Go payment statuses are confirmed asynchronously, so webhook notifications from dLocal are mandatory.

Chargebee registers and manages the dLocal webhook endpoint for your site. You do not need to create the endpoint manually in the dLocal dashboard.

dLocal sends notifications for the following updates, which Chargebee applies to the corresponding record:

NotificationWhat Chargebee updates
Payment status updateMoves the transaction to success or failure based on the final dLocal payment status.
Enrollment status updateActivates, rejects, cancels, or expires the stored Touch 'n Go payment method.
Refund status updateMarks the refund as complete or failed.

Checkout flow

Your customer completes the following steps at checkout when paying with Touch 'n Go via dLocal:

  1. The customer reviews the order on the Your cart page and clicks Proceed to Checkout.

  2. The customer enters Account Details, Billing Address, and the document number, selects Touch 'n Go, and clicks Pay & Subscribe.

  3. The customer is redirected to approve the payment and the enrollment. In production this opens the Touch 'n Go app. In sandbox, dLocal shows a Wallet Payment page where you can Pay or Reject the test payment.

  4. The customer is redirected back to Chargebee.

  5. Chargebee marks the transaction as successful or failed when it receives the status from dLocal, and the order confirmation page appears.

Enable for subscriptions

Touch 'n Go supports recurring billing through dLocal enrollments.

  • First payment (customer-initiated). Chargebee sends the payment and the enrollment request together. The customer approves both in a single redirect. dLocal creates an on-demand enrollment.
  • Stored payment method. Chargebee stores the dLocal enrollment ID as the payment method reference for the customer.
  • Renewals (merchant-initiated). Chargebee charges the stored enrollment directly. The customer is not redirected again. The enrollment must be active at dLocal before a renewal can succeed. A merchant-initiated payment against an enrollment that is still pending approval fails.
  • Adding the method without a payment. Chargebee can create an enrollment on its own, without a payment. The customer still completes a redirect to authorize it.
  • Removing the method. Deleting the payment method in Chargebee cancels the enrollment at dLocal.

Testing in sandbox

Use the dLocal sandbox environment to validate the Touch 'n Go flow end to end.

Test payer details:

FieldValue
CountryMalaysia (MY)
CurrencyMYR
Document number (NRIC)123456789012

A sandbox transaction stays pending until the customer completes the redirect and dLocal sends the status notification. Treat that transaction as pending until the notification arrives.

Testing in production

Before going live:

  • Confirm that Touch 'n Go is enabled in your live dLocal account.
  • Confirm that Touch 'n Go is turned on for the live dLocal gateway instance in Chargebee, and that Smart Routing sends MYR transactions to that instance.
  • Run an end-to-end transaction with a real Touch 'n Go wallet, because approval requires the Touch 'n Go app.
  • Verify that the transaction moves from pending to success after the webhook notification arrives.
  • Verify that a renewal against the stored enrollment succeeds without a redirect.

Reconciliation

To reconcile transactions between Chargebee and dLocal:

  1. Retrieve the id_at_gateway value from the Chargebee transaction details.
  2. Locate the payment with the same ID in your dLocal reports.
  3. Match the transactions using this reference to ensure financial consistency.

Error codes and troubleshooting

Open the failed Touch 'n Go transaction and check Error details for the dLocal response. Error intelligence categorizes the failure. No additional configuration is required.

FAQs

1. Can customers use Touch 'n Go for recurring subscriptions?

Yes. The customer approves an enrollment during the first payment, and Chargebee uses that enrollment to collect renewals without redirecting the customer again.

2. Why is my Touch 'n Go transaction still pending?

Touch 'n Go is asynchronous. The transaction stays pending until the customer completes the redirect and dLocal sends the final status notification. If a transaction stays pending well beyond the redirect window, the customer most likely abandoned the approval.

3. Can I capture a Touch 'n Go payment manually?

No. Touch 'n Go supports auto capture only. Manual capture and void are not available.

4. Does the billing address country affect Touch 'n Go?

No. Chargebee always sends Malaysia as the payer country for Touch 'n Go, regardless of the billing address on the customer record.

5. Is the document number mandatory?

Chargebee does not enforce it, but dLocal's Malaysia reference lists the document (NRIC) as required, so a payment without it can be rejected by dLocal. Chargebee sends the document number to dLocal only when the customer provides one. Collect the document number at checkout.

Limitations and important points

  • Touch 'n Go is available only for Malaysia and only in MYR.
  • The minimum transaction amount is 5 MYR, as defined by dLocal.
  • Manual capture and void are not supported. Use a refund after the payment settles.
  • A refund against a payment that is still pending at dLocal fails.
  • A renewal fails if the enrollment has not reached the active state at dLocal.