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.
  • curl or any HTTP client.

Your first payment in five steps

  1. 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:read and transactions:read.

    The key is shown once. It starts with ezpay_test_. Store it in an environment variable.

    Shell
    export EZP_KEY="ezpay_test_..."
    
  2. Check the key

    Shell
    curl 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.

  3. Create a booking

    A booking is a trip file. It can carry its first priced option, called an alternative.

    Shell
    curl -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.id from the response. Amounts are always integers in cents: 480000 is 4,800.00.

  4. Create a payment link

    Shell
    curl -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.

  5. Pay it and read the payment

    Open checkoutUrl and pay with the Stripe test card 4242 4242 4242 4242, any future expiry date and any CVC. If a 3D Secure test screen appears, approve it.

    Then list the payments:

    Shell
    curl "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

  1. Switch the app back to live mode and create a new key. Live keys start with ezpay_live_.
  2. Give the key only the scopes it needs. You can set an expiry date of 90, 180 or 365 days.
  3. Register your webhook endpoints again in live mode. Test and live endpoints are separate.
  4. Store the key in a secrets manager. It cannot be displayed again. If it leaks, revoke it from the app and create another.

Where to go next