Skip to main content

Integration Flow

The recurring payments integration involves three main steps:
1

Step 1

Register Wallet Mandate: Customer authorises their wallet for future charges.
2

Step 2

Fetch Token Details: Retrieve and verify the mandate registration.
3

Step 3

Charge Customers: Create subsequent payments as needed.

1. Register Wallet Mandate

Mandate registration creates an authorisation transaction where customers provide consent to charge their Touch’n Go wallet for future payments. This generates a secure token that represents the customer’s payment authorisation.
Watch Out!Standard Checkout authorisation can only be created using Razorpay Curlec APIs.Step 1: Create a CustomerCreate a customer record in Razorpay Curlec to associate the mandate with. This returns a customer_id to be used in subsequent steps.Step 2: Create an OrderCreate an order for the authorisation amount. You can set this to RM 1 for minimal authorisation or the actual first payment amount. Pass the token parameters including max_amount and expire_at to set mandate limits.Step 3: Create Authorisation PaymentInitialise Razorpay Curlec Checkout with the order_id, customer_id and recurring-specific parameters. Specify wallet as the payment method. The customer completes the authorisation on Touch’n Go interface. Once the authorisation is successful, you receive a token_id in the payment response. This token represents the customer’s wallet mandate.
Create a Registration Link using: Specify the authorisation amount, customer details, wallet type (Touch’n Go) and token parameters (max_amount and expire_at). The link can be sent to your customer via email or SMS. Send the link to your customer. The customer clicks the link, is redirected to Touch’n Go wallet interface, and completes the authorisation.
No Need to Create Customer and Order SeparatelyWhen using registration links, Razorpay Curlec automatically creates both the customer and order records for you.
A registration link moves through the following states during its life cycle:

Status | Description | Webhook

Expired | The registration link has expired. You can set an expiry timestamp at the time of creation. | invoice.expired

Authorisation Payment Statuses

Once the customer has made the Authorisation Payment, it moves through the following states as per the payment flow:

Status | Description | Webhook

Created | Payment is created when a customer enters and submits the payment information. | NA

Authorized | Payment is authorized when the customer’s payment details are successfully authenticated by the bank. | payment.authorized

Captured | Indicates that the payment is verified by you. Once a payment is captured you can retrieve the token. | payment.captured or order.paid

Failed | Indicates that the payment has failed. If the payment has failed, you need to create an authorisation transaction again. | payment.failed

2. Fetch Token Details

After the authorisation transaction is complete, a token is generated. The token securely stores the customer’s wallet authorisation and represents their mandate. You can retrieve token information using:

Token Lifecycle

Tokens move through different states from creation to expiry:

token_status | Description | Next Step

initiated | Indicates that the bank is processing the mandate registration. | Wait for the token.confirmed webhook.

confirmed | Indicates that the bank has completed the mandate registration. | Create recurring payment

rejected | Indicates that the mandate registration has failed. | Create the authorisation transaction again.

cancelled | Indicates that the token has been cancelled. | Create the authorisation transaction again if you want to charge the customer.

paused | Indicates that the token has been paused by your customer. | The token is inactive. Your customer has paused the token. Ask them to resume the token to charge them.

3. Charge Customers

Once the token is in confirmed state, you can create recurring payments without customer intervention. Each subsequent payment requires you to create a new charge request.
Important
  • Always ensure the charge amount does not exceed the max_amount specified during token creation. Charges exceeding this limit will fail.
  • Ensure customers maintain sufficient balance in their Touch’n Go wallet for successful recurring charges.

How to Charge Customers

Step 1: Find the Token Use the Dashboard search to locate the customer’s token. Verify the token status is confirmed. Step 2: Create a Charge Click Charge Token and enter the payment amount. Razorpay Curlec automatically creates an order and processes the payment.
Automatic Order CreationWhen charging via Dashboard, Razorpay Curlec automatically creates the order for you - no need to create it separately.Step 1: Create an OrderEach subsequent payment must be associated with a unique order. This allows you to track payments and handle retries. Specify the charge amount, currency (MYR) and optional notes for tracking.Step 2: Create a Recurring PaymentUse the token_id to create a payment for the order. No customer action required. The payment is processed automatically against the customer’s Touch’n Go wallet balance.SUCCESSBest PracticeSet up webhooks to receive real-time notifications about payment status changes. This ensures you are immediately notified of successful or failed charges.
List of Wallets APIs