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.

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

  1. Purchases start inside your game. There is no top-up page on the EZ2Pay website.
  2. Prices come from your EZ2Pay SKUs. Your game sends a SKU code, never a price.
  3. There is no test mode. Use the webhook test button, then buy your lowest-priced SKU for real after activation.
  4. Do not show the EZ2Pay name or credit inside your game. The seller name appears on the EZ2Pay checkout page and receipt.
  5. Deliver goods from your server only. Never from the client or the return_url page.
  6. Keep money as integer satang. 1 THB = 100 satang. Never use floating point.

Pages

PageWhat it covers
Getting startedFrom sign-up to your first sale
Orders and checkout linksCreate orders, read them, every status
Webhooks and deliveryVerify signatures, grant once, acknowledge delivery
Direct HTTP integrationComplete server code in Node and Python
Set up with AI through MCPLet an AI tool do setup, and what it can never do
Errors and fixesError 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

TermMeaning
SKUOne item for sale, such as gem_pack_100, with a code, a name and a price
OrderOne purchase, identified by an ord_... ID
checkout_urlThe EZ2Pay page you send the player to
buyerYour player's ID in your game, such as p_123
WebhookThe 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.