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.Registration Link Flow
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.
Registration Link Statuses
A registration link moves through the following states during its life cycle:Status | Description | Webhook
Issued | A registration Link is created and sent to the customer. | NA
Paid | Payment is made for the issued registration Link. Once the registration Link is paid, search for Token corresponding to the payment. | invoice.paid
Cancelled | The registration link has been canceled. In such cases, you need to create a registration link again.| NA
Expired | The registration link has expired. You can set an expiry timestamp at the time of creation. | invoice.expiredAuthorisation 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.failed2. 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.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.