Skip to main content

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_key is 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

  1. The customer selects TrueMoney as their payment method at checkout.
  2. A QR code is displayed on the screen.
  3. The customer opens the TrueMoney app on their mobile device and scans the QR code.
  4. The customer authenticates using their device PIN or biometrics and confirms the payment.
  5. The merchant receives a success notification after confirmation.

Mobile app flow

  1. The customer selects TrueMoney as their payment method at checkout.
  2. A deep link is triggered, automatically opening the TrueMoney app on the customer's device.
  3. The customer reviews the payment details in the TrueMoney app.
  4. The customer authenticates using their device PIN or biometrics and confirms the payment.
  5. 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.

  1. 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
  2. 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

    ParameterRequirementDescription
    integration_keyRequiredYour EBANX integration key
    payment_type_codeRequiredSet to truemoney
    countryRequiredSet to th for Thailand

    Customer data

    ParameterRequirementDescription
    nameRequiredCustomer name
    emailRequiredCustomer email
    phone_numberOptionalCustomer phone number

    Charge parameters

    ParameterRequirementDescription
    merchant_payment_codeRequiredUnique merchant payment code
    currency_codeRequiredSupported value: THB
    amount_totalRequiredTotal amount to be charged
    redirect_urlOptionalMerchant URL to redirect the customer after payment
    Transaction limits

    TrueMoney has a minimum amount of THB 20.00 and a maximum of THB 50,000.00 per transaction.

  3. 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_url inside the truemoney object 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 expiration

    TrueMoney 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.

  4. Monitor payment for status change

    At this stage, the payment will appear as pending (PE) in your
    EBANX Dashboardchevron_right

    After the customer completes the payment, EBANX will send a CO (confirmed) payment status to the merchant.

    Notifications

    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.

  5. Congratulations!

    You have successfully integrated TrueMoney.

    For more information, refer to the
    Direct API reference guidechevron_right

Resources

Use the following resources when testing in your sandbox environment.

Still need help?

Help Image

We hope this article was helpful. If you still have questions, you can explore the following options: