Quickstart
Create a test key, check it, then create a booking and a payment link from your own code. About ten minutes, without touching real money.
Checked against the API code on October 13, 2026
Ezus Pay exposes a REST API to create bookings and payment links, read payments and issue refunds. Signed webhooks tell your system the moment something happens. This page takes you through a full payment in test mode.
Before you start
- An Ezus Pay account with the admin role. Only admins can create API keys and webhooks.
- A server-side environment. The API does not accept calls from a browser on another domain, so keep your key on your server.
curlor any HTTP client.
Your first payment in five steps
Create a test key
In the app, switch to Test mode, then open Settings → Integrations → API keys. Create a key with these scopes:
bookings:write,payment-links:write,payment-links:readandtransactions:read.The key is shown once. It starts with
ezpay_test_. Store it in an environment variable.Shellexport EZP_KEY="ezpay_test_..."Check the key
Shellcurl https://api.ezuspay.app/v1/ping -H "x-api-key: $EZP_KEY"The response gives your agency, the scopes of the key and
"mode": "TEST". If you see"LIVE", you are holding a live key.Create a booking
A booking is a trip file. It can carry its first priced option, called an alternative.
Shellcurl -X POST https://api.ezuspay.app/v1/bookings \ -H "x-api-key: $EZP_KEY" -H "Content-Type: application/json" \ -d '{ "name": "Bali honeymoon 2026", "clientName": "Jean Dupont", "clientEmail": "jean@example.com", "alternative": { "alternativeName": "14 days", "totalAmountCents": 480000, "departureDate": "2026-07-10", "returnDate": "2026-07-24", "travelersCount": 2 } }'Keep
data.booking.idfrom the response. Amounts are always integers in cents:480000is 4,800.00.Create a payment link
Shellcurl -X POST https://api.ezuspay.app/v1/bookings/BOOKING_ID/payment-links \ -H "x-api-key: $EZP_KEY" -H "Content-Type: application/json" \ -d '{ "amountCents": 144000, "label": "Deposit 30%" }'The response contains
checkoutUrl. That is the page your traveler pays on.Pay it and read the payment
Open
checkoutUrland pay with the Stripe test card4242 4242 4242 4242, any future expiry date and any CVC. If a 3D Secure test screen appears, approve it.Then list the payments:
Shellcurl "https://api.ezuspay.app/v1/transactions?status=SUCCEEDED" -H "x-api-key: $EZP_KEY"To be told about the payment without polling, add a webhook. See Webhooks.
Going live
- Switch the app back to live mode and create a new key. Live keys start with
ezpay_live_. - Give the key only the scopes it needs. You can set an expiry date of 90, 180 or 365 days.
- Register your webhook endpoints again in live mode. Test and live endpoints are separate.
- Store the key in a secrets manager. It cannot be displayed again. If it leaks, revoke it from the app and create another.