Touch'n Go
Touch 'n Go (TnG) started as a physical public transportation card in the 90s. In 2017, they entered the fintech space with Touch 'n Go Digital, a mobile digital wallet app facilitating investments and loans. The wallet balance is not interchangeable with the public transportation card, but can be used to top up the physical card.
Features
Processing currencies | MYR,GBP,USD,EUR |
---|---|
Settlement currencies | GBP,USD,EUR,HKD |
Minimum transaction amount | 0.01 MYR |
Maximum transaction amount | 5,000 MYR |
Refunds | ✅ |
Partial Refunds | ✅ |
Multiple partial refund | ❌ |
Chargeback | ❌ |
Integration Method
Payment method enumeration values: touchngo
There is integration method for Touch'n Go
- Direct API
- Checkout
Direct API
How to integration
For direct API integration, you can create a PaymentIntent and get url in only one step. The following is the demo of creating payment intent:
A PaymentIntent is an object that represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent on your server and specify the amount to collect and a supported currency. If you have an existing Payment Intents integration, add touchngo
to the list of payment method types.
Request
{
"amount":200,
"currency":"MYR",
"confirm":true,
"payment_method_options":{
"touchngo":{
"terminal_type":"WAP",
"os_type": "IOS"
}
},
"payment_method_data" : {
"type":"touchngo"
},
"return_url":"https://wooshpay.com"
}
Response
{
"id": "pi_1747097483470700544",
"object": "payment_intent",
"created": 1705375474000,
"livemode": true,
"currency": "MYR",
"amount": 200,
"status": "requires_action",
"client_secret": "pi_1747097483470700544_secret_6NKIUZVqZSbnKv2ej5XTsG9D",
"next_action": {
"type": "touchngo_handle_redirect",
"touchngo_handle_redirect": {
"url": "https://m.tngdigital.com.my/s/ac-cashier-intermediate/h5.html?ACCodeValue=281666040097Q4x70bKbWzT2gE7RLoq48dll"
}
},
"payment_method_types": ["touchngo"],
"confirmation_method": "automatic",
"payment_method_options": {
"touchngo": {
"terminal_type": "WAP",
"os_type": "IOS"
}
},
"return_url": "https://wooshpay.com",
"payment_method": "pm_1747097483386814464",
"capture_method": "automatic"
}
Checkout
Payment flow
- Customer selects Touch'n Go from the list of payment methods available and clicks on the Pay botton
- Customers will be redirected to Touch'n Go's page. Scan QR and approve the payment
Create a Session
Request
{
"cancel_url": "www.baidu.com",
"mode": "payment",
"success_url": "https://wooshpay.com/",
"payment_method_types":["touchngo"],
"line_items": [
{
"price_data": {
"currency": "MYR",
"unit_amount":100,
"nickname": "test name",
"product_data": {
"name": "taiwan fengli",
"description": "very delicious",
"url": "www.baidu.com"
}
},
"quantity": 1
}
]
}
Response
{
"id": "cs_1747098191423078400",
"object": "checkout.session",
"created": 1705375643000,
"livemode": true,
"currency": "MYR",
"customer": "",
"mode": "payment",
"status": "open",
"url": "https://checkout.wooshpay.com/pay/cs_1747098191423078400?key=cGtfbGl2ZV9OVEUzTVRJd056RXpPRGd6TkRJek9UQTNPRFV4T2tsNE9IbHBaRXh0VjJOb2JUWlVaMngwYkdSNFFqWm5kVEUyT1Rjd01qUTJNREkwTURR",
"cancel_url": "www.baidu.com",
"line_items": {
"object": "list",
"data": [
{
"id": "li_1747098191444049920",
"object": "item",
"currency": "MYR",
"description": "taiwan fengli",
"price": {
"id": "price_1747098191452438528",
"object": "price",
"created": 1705375643000,
"livemode": true,
"active": false,
"currency": "MYR",
"nickname": "test name",
"product": {
"id": "prod_1747098191460827136",
"object": "product",
"created": 1705375643000,
"livemode": true,
"active": false,
"description": "very delicious",
"name": "taiwan fengli",
"url": "www.baidu.com",
"updated": 1705375643000
},
"type": "one_time",
"unit_amount": 100,
"billing_scheme": "per_unit"
},
"quantity": 1,
"amount_subtotal": 100,
"amount_total": 100
}
]
},
"payment_intent": "pi_1747098194937905152",
"payment_method_types": [
"touchngo"
],
"payment_status": "unpaid",
"success_url": "https://wooshpay.com/",
"amount_subtotal": 100,
"amount_total": 100,
"billing_address_collection": "auto",
"expires_at": 1705462043009,
"payment_link": "",
"client_secret": "pi_1747098194937905152_secret_RHC7UBQeKYshh51mpCgQH8Ov"
}
Next step
You can add more features to your integration as needed
Create a Webhook
Listen to events on your WooshPay account so your integration can automatically trigger reactions. Create a webhook that mainly focuses on enabled_events and url.
Create a Refund
Create a refund to repay funds to your customer. You can also perform partial refunds, but not every payment method supports them. A partial refund is when you refund only part of the original transaction amount.