How to test and sandbox debug Thai Payments interface?

Thailand Payment Interface Testing and Sandbox Debugging Guide

As a payment platform expert, here is a detailed methodology for testing and sandboxing the Thai payment interface:

1. Obtain access to the sandbox environment

  • Register for a developer account: Apply for a developer account on the official website of the target payment gateway (e.g. Omise, 2C2P, TrueMoney, etc.)
  • Apply for an API key: Get the test API key (usually divided into public key and secret key) for the sandbox environment.
  • Download SDK/Documentation: Get the official SDK and API documentation.

2. Common Thai payment interface types and testing points

a. Bank card payments

  • test card number: Use the test card number provided by the provider (e.g. 4111 1111 1111 1111 1111)
  • CVV/CVC: Any 3 digits
  • validity period: Future dates
  • 3D Secure Verification: Simulate different response scenarios (success/failure/timeout)

b. QR code payment (PromptPay)

  • Generate test QR codes
  • Simulate the code scanning process
  • Validating callback notifications

c. TrueMoney wallet

3. TrueMoney wallet interface test methodology

TrueMoney is a popular e-wallet in Thailand and testing its payment interface requires the following steps:

a. Obtain sandbox environment credentials

  • Register and apply on the TrueMoney Developer PlatformSandbox Merchant Account
  • Get the test API Key, Merchant ID, Secret Key
  • Download official SDK (e.g. PHP/Java/Python) or REST API documentation

b. TrueMoney sandbox simulation process

  1. User authorisation login simulation

    • Use the test mobile phone number provided by the sandbox (e.g.0812345678) and OTP authentication codes (such as123456)
    • The SDK should return a temporary Token for the payment request
  2. Initiating a payment request (API call example)

import requests

url = "https://sandbox.truemoney.com/api/v1/payments"
headers = {
"Authorization": "Bearer YOUR_SANDBOX_API_KEY",
"Content-Type": "application/json"
}
payload = {
"merchant_id": "SANDBOX_MERCHANT_ID",
"amount": 100, # THB (Thai Baht)
"reference_id": "TEST_ORDER_123".
"callback_url": "",
}

response = requests.post(url, headers=headers, json=payload)
print(response.json()) # {status: success, payment_url: "..." , transaction_id: ...}

  1. Simulated user confirmation of payment

    • Sandbox returns a virtual payment_url
    • To access this URL, enter the test OTP (111111) Completion of deductions
  2. Validating callback notifications

    POST /your-callback-endpoint HTTP/1.1
    {
    "transaction_id": "SANDBOX_TXN_001",
    "status": "success",
    "amount": 100.
    "reference_id": "TEST_ORDER_123"
    }

c.PromptPay (Thai national QR standard)

a.Generate sandbox QR codes

curl -X POST https://api.sandbox.bank.co.th/qr/generate \
-H 'Authorisation: Bearer SANDBOX_API_KEY' \
-d '{
"amount":50.
"account": "0912345678@thaibank",
"note": "Test Payment"
}'

Response Example:

{"qr_data": "000201010212..." , "expiry_time": "2025-12-31T23:59"}

b.Simulation tool for scanning payment results

Some banks provide Webhook debuggers (such as Kasikorn'sK+ Developer Sandbox) The SUCCESS/FAIL state can be triggered manually.


d.Special handling of credit cards (International/VISA/Mastercard)

Thailand Localisation Requirements.
|Fields|Test Values|Description|
|—|—|—|
|Card Number|411111111111111111|VISA test card|
|CVV |any 3-digit number||
Expiry DateFuture Month|||
3D Secure Certification mandatory scenario:
1️⃣ Success Process → OTP InputThe sandbox provides the value
2️⃣ Failure Process → OTP Error Three Times
3️⃣ timeout → no OTP input wait 300 seconds


#4. Summary of key validation points

✅All amounts must be THB and support decimals (0 disabled!)
✅ Receive asynchronous notifications correctly (callback/webhook)
✅ Logging complete raw request/response
⚠️ Make sure the sandbox flag is turned off before switching between real environments!

Need a more detailed case study of a particular provider? For example Omise or 2C2P?