This site contains affiliate links — we may earn a commission if you sign up through them. Details

Accepting PromptPay on Your Website: A Complete Technical Guide 2026

Accepting PromptPay on Your Website: A Complete Technical Guide 2026

PromptPay has become Thailand's dominant payment method for both consumers and merchants. Integrating it into your website requires more than understanding the payment flow—you need solid knowledge of webhooks, server-side verification, and security best practices. This guide covers every technical aspect of accepting PromptPay.

What is PromptPay and Why It Matters for E-Commerce

PromptPay is Thailand's national QR code payment system, developed by the Bank of Thailand to simplify mobile money transfers. Instead of memorizing long bank account numbers, users send money using a PromptPay ID—typically a phone number, national ID, or tax number. For website operators, supporting PromptPay is nearly essential to reach Thai customers effectively.

The QR Code Payment Flow: Step-by-Step

When a customer selects PromptPay at checkout, your server generates a QR code in EMV format containing transaction details: the amount, the merchant's PromptPay ID, and a reference number. The customer scans the QR using their smartphone, which opens their bank app to confirm the transfer. Simultaneously, the payment gateway's servers send a webhook callback to your website's backend, notifying your system that the payment completed.

Payment Gateway Categories: How to Choose

Several categories of payment solutions support PromptPay. Third-party payment gateways are all-in-one platforms that handle multiple payment methods including PromptPay, abstracting away compliance complexity. Bank merchant APIs offer deeper control but require more technical expertise. E-commerce platform plugins provide the easiest setup with minimal coding, though less customization potential.

Integration Steps: From Registration to Live

Integration typically follows a standard sequence. First, register with a payment provider that supports PromptPay. Second, retrieve your API credentials and store them securely. Third, install the provider's SDK or library. Fourth, build a backend endpoint to receive and validate webhook notifications. Fifth, test the entire flow in a sandbox environment before enabling live transactions.

Webhooks and Server-Side Payment Verification

A webhook is an HTTP callback—the payment gateway sends a POST request to your server whenever transaction status changes. Your backend must validate the webhook by checking its cryptographic signature using a secret key only your server and the gateway know. This validation prevents attackers from forging fake payment notifications. Never assume a payment succeeded based on client-side signals alone.

RecommendedAsiaGB.com — Web Hosting & VPS we recommend. Servers in Thailand & Singapore, SSD storage, DirectAdmin control panel, 24/7 Thai-language support, 99% uptime.

Based in Thailand, ideal for Thai websites and businesses.

Visit AsiaGB →

PromptPay vs Credit Card Gateways: Key Differences

PromptPay and credit card payments differ fundamentally. Credit card transactions require customers to enter sensitive card data that flows through your website. PromptPay requires no card data; instead, customers authenticate within their bank's app. Credit card processing mandates PCI-DSS compliance, a stringent standard that restricts what payment data your servers can touch. PromptPay avoids this entirely.

Critical Security Considerations for Merchants

Security in PromptPay integration centers on server-side validation and credential management. Never trust client-side payment signals. Store API secrets in environment variables on your backend server; never hardcode them. Use HTTPS exclusively for webhook endpoints. Validate webhook signatures using the shared secret via HMAC-SHA256. Log all webhook events for auditing, and idempotently handle duplicate webhooks by checking if a transaction ID was already processed.

Best Practices and Implementation Tips

Implement these best practices: use a unique reference ID for each transaction. Send a confirmation email immediately upon successful webhook verification. Log all webhook events to a database table for auditing. Implement exponential backoff retry logic for failed webhook deliveries. Consider using a message queue to process webhooks asynchronously for resilience during traffic spikes.

Frequently Asked Questions

Can't I just have the customer redirect back to my website and assume payment succeeded?

No. Customers or attackers can bypass redirects or manipulate URL parameters. Webhooks are server-to-server notifications that cannot be forged without your secret key—the authoritative record that payment truly succeeded.

Does PromptPay support refunds?

Yes, but only merchant-initiated. The merchant must initiate the refund through the payment gateway's dashboard using the original transaction ID. The refunded amount returns to the customer's bank account within 1-3 business days.

My API secret was exposed. What should I do?

Immediately generate a new API key and redeploy your server with the new secret. Review webhook logs for the past 24-48 hours to identify any unauthorized transactions. Ask your provider to revoke the old key.

How long is a webhook signature valid?

Typically 5 minutes to 1 hour from creation, depending on your provider. Validating the timestamp ensures attackers cannot replay old webhook events to trigger duplicate orders.