EZ2Pay developer documentation
EZ2Pay is an in-game sales system. Your game server creates an order, the player pays on the EZ2Pay checkout page, and EZ2Pay tells your server which item to deliver.
EZ2Pay is the seller to the player. You sell your in-game goods to EZ2Pay and receive payment for them at the rate shown in your Dashboard.
amountis the full retail price the player pays EZ2Pay. It is not the amount you receive."100.00"means the player pays 100 THB. The Dashboard shows what you receive for each sale and the date you can receive it.
How a sale works
Player taps buy in your game
-> Your server: POST /v1/orders, gets checkout_url
-> Player pays on the EZ2Pay checkout page
-> EZ2Pay confirms the payment and POSTs a signed webhook to your server
-> Your server verifies the signature and asks GET /v1/orders/{id}
-> Your server grants the goods once, in one database transaction
-> Your server: POST /v1/orders/{id}/delivered, then answers 200
-> Player returns to your return_url
Rules
- Purchases start inside your game. There is no top-up page on the EZ2Pay website.
- Prices come from your EZ2Pay SKUs. Your game sends a SKU code, never a price.
- There is no test mode. Use the webhook test button, then buy your lowest-priced SKU for real after activation.
- Do not show the EZ2Pay name or credit inside your game. The seller name appears on the EZ2Pay checkout page and receipt.
- Deliver goods from your server only. Never from the client or the
return_urlpage. - Keep money as integer satang. 1 THB = 100 satang. Never use floating point.
Pages
| Page | What it covers |
|---|---|
| Getting started | From sign-up to your first sale |
| Orders and checkout links | Create orders, read them, every status |
| Webhooks and delivery | Verify signatures, grant once, acknowledge delivery |
| Direct HTTP integration | Complete server code in Node and Python |
| Set up with AI through MCP | Let an AI tool do setup, and what it can never do |
| Errors and fixes | Error codes and common mistakes |
For AI tools and generators: llms.txt and OpenAPI.
What you need
- A game server with a public HTTPS URL that can receive webhooks.
- A durable database, such as PostgreSQL, so each order is delivered exactly once.
- Any server language that can make HTTPS requests and compute HMAC-SHA256. No EZ2Pay library is required.
Terms
| Term | Meaning |
|---|---|
| SKU | One item for sale, such as gem_pack_100, with a code, a name and a price |
| Order | One purchase, identified by an ord_... ID |
checkout_url | The EZ2Pay page you send the player to |
buyer | Your player's ID in your game, such as p_123 |
| Webhook | The signed message EZ2Pay sends your server when a sale succeeds |
When a player has a problem
The player contacts your game team first, using the contact link on the receipt. Search the order in the Dashboard by Order ID or Player ID to see its status, resend the notification, or escalate it to EZ2Pay. See Errors and fixes.