Getting Started
Make your first EzPays API call in under five minutes.
The EzPays Public API is a JSON-over-HTTPS REST API. This guide walks you through creating your first payment link.
1. Get an API key
- Sign in to your EzPays dashboard.
- Open Settings → API Keys (or
/api-keys). - Click Create key, choose Test mode, and copy the secret. It begins with
ezp_test_and is shown only once.
Store the secret in a password manager or a secret store (Doppler, AWS Secrets Manager, GCP Secret Manager). Never commit it to source control.
2. Make a request
All requests use HTTPS, JSON bodies, and a Bearer token.
curl https://api.ezpays.app/api/public/v1/payment-links \
-H "Authorization: Bearer ezp_test_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"creditor_id": "cr_123",
"amount": "12500",
"currency": "USD",
"description": "Invoice #1042"
}'A successful call returns a 201 Created:
{
"id": "pl_2g8f...",
"token": "tok_4mZ...",
"status": "active",
"payment_url": "https://pay.ezpays.app/p/tok_4mZ...",
"qr_url": "https://pay.ezpays.app/p/tok_4mZ.../qr.png",
"...": "..."
}Send your customer to payment_url to complete the payment.
3. Receive a webhook
Register an HTTPS endpoint and listen for payment_link.completed to be notified when the customer pays. See Verifying webhooks.
4. Promote to live mode
When you're ready, create a new key with Live mode. The prefix changes to ezp_live_. The API surface and shapes are identical — only the underlying payment provider changes.
Base URL
| Environment | URL |
|---|---|
| Production | https://api.ezpays.app/api/public |
| Staging | https://staging-api.ezpays.app/api/public |
All endpoints in this documentation are relative to those base URLs.