TrueMoney
TrueMoney is a digital wallet payment method in Thailand that allows customers to make fast and secure payments across online and offline merchants. By integrating TrueMoney, merchants can offer a seamless checkout experience for Thai customers on both web and mobile.
TrueMoney supports two flows from a single integration: a QR code flow for desktop web checkout and a deep link redirect flow for mobile. Payments are processed in real time via the TrueMoney app.
This guide outlines the key concepts and implementation details required to integrate TrueMoney via API. It covers essential steps such as creating a payment request, handling customer redirection, and monitoring payment status.
Requirements
- API authentication - All API requests must be authenticated using JWS (JSON Web Signature). The legacy
integration_keyis being deprecated — if you still use it, follow the Migration Guide to transition to JWS. If you don't have credentials yet, complete the Merchant Signup Form. - Familiarity with EBANX Direct - This setup follows the same general structure as other payment methods, with a few unique parameters. See EBANX Direct for more info.
How it works
Web flow
- The customer selects TrueMoney as their payment method at checkout.
- A QR code is displayed on the screen.
- The customer opens the TrueMoney app on their mobile device and scans the QR code.
- The customer authenticates using their device PIN or biometrics and confirms the payment.
- The merchant receives a success notification after confirmation.
Mobile app flow
- The customer selects TrueMoney as their payment method at checkout.
- A deep link is triggered, automatically opening the TrueMoney app on the customer's device.
- The customer reviews the payment details in the TrueMoney app.
- The customer authenticates using their device PIN or biometrics and confirms the payment.
- The merchant receives a success notification after confirmation.
Payment sources
TrueMoney app redirection allows customers to make payments using the following methods:
- TrueMoney Wallet (wallet balance)
- Bank account
- Credit/debit card
Payment confirmation
Once the transaction is successful, the customer receives a confirmation on their TrueMoney app, and the merchant is updated with the transaction status. EBANX sends you a notification confirming the successful transaction, allowing you to fulfill your customer's order.
Instructions
Follow the steps below.
- Select your environment
Select the appropriate environment for your integration. Use the sandbox environment for testing, or the production environment for live transactions. Use the URL for your HTTP requests based on your selection.
https://sandbox.ebanx.com/ws/direct - Create a TrueMoney payment
To create a TrueMoney payment, define the parameters in your request. The following tables outline the required parameters for the payment process.
Basic parameters
Parameter Requirement Description integration_keyRequired Your EBANX integration key payment_type_codeRequired Set to truemoneycountryRequired Set to thfor ThailandCustomer data
Parameter Requirement Description nameRequired Customer name emailRequired Customer email phone_numberOptional Customer phone number Charge parameters
Parameter Requirement Description merchant_payment_codeRequired Unique merchant payment code currency_codeRequired Supported value: THBamount_totalRequired Total amount to be charged redirect_urlOptional Merchant URL to redirect the customer after payment Transaction limitsTrueMoney has a minimum amount of THB 20.00 and a maximum of THB 50,000.00 per transaction.
- Send payment request
Send the following request to initiate a TrueMoney payment.
cURL Request (Sandbox Example)
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"operation": "request",
"payment": {
"name": "John Doe",
"email": "john.doe@example.com",
"country": "th",
"phone_number": "5555555555",
"payment_type_code": "truemoney",
"merchant_payment_code": "{{unique_merchant_code}}",
"currency_code": "THB",
"amount_total": 99.85,
"redirect_url": "https://merchant.example.com/callback"
}
}'API Response Example
A successful request will return a response similar to this:
{
"payment": {
"hash": "59acc5f00945fa382ab051651440826da7701533249b3a475",
"country": "th",
"merchant_payment_code": "{{unique_merchant_code}}",
"order_number": null,
"status": "PE",
"status_date": "{{YYYY-MM-DD HH:mm:ss}}",
"open_date": "{{YYYY-MM-DD HH:mm:ss}}",
"confirm_date": null,
"transfer_date": null,
"amount_br": "99.85",
"amount_ext": "99.85",
"amount_iof": "1",
"currency_rate": "1",
"currency_ext": "THB",
"due_date": "{{YYYY-MM-DD}}",
"instalments": "1",
"payment_type_code": "truemoney",
"pre_approved": false,
"capture_available": null,
"truemoney": {
"redirect_url": "{{redirect_url}}"
}
},
"status": "SUCCESS"
}The
redirect_urlinside thetruemoneyobject is the deep link that triggers the TrueMoney app on mobile. Redirect the customer to this URL on mobile checkout. When rendered on desktop, this URL will display a QR code for the customer to scan.Session expirationTrueMoney QR codes and redirect sessions expire after 3 minutes. If the customer does not complete payment within this window, the transaction will fail and the status will be set to canceled (CA).
When testing in sandbox, a simulator environment will be rendered, allowing you to accept or decline the payment without communicating directly with TrueMoney.
- Monitor payment for status changeAt this stage, the payment will appear as pending (PE) in yourEBANX Dashboardchevron_right
After the customer completes the payment, EBANX will send a CO (confirmed) payment status to the merchant.
Notifications
-
EBANX will send a notification whenever a payment status changes.
-
Make sure your system is set up to receive notifications from EBANX for any changes in payment status.
Status
-
After receiving a notification that status has changed, retrieve the payment status.
-
When a payment is confirmed, the status will change from pending (PE) to confirmed (CO). If the customer does not complete the payment within 3 minutes, the status will change to canceled (CA).
Refunds
TrueMoney charges can only be refunded within 30 days after the charge is created.
-
- Congratulations!
You have successfully integrated TrueMoney.
For more information, refer to theDirect API reference guidechevron_right
Resources
Use the following resources when testing in your sandbox environment.
API Reference
Click here to access detailed API documentation to integrate efficiently.
Mock Customer Data
Click here to view mock customer data for testing and validating user flows.
Error Codes
Click here to review common error codes to troubleshoot and resolve issues quickly.
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.