Creating an Invoice
curl -X POST https://your-server/invoices \
-H "Authorization: Bearer ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"store_id": "00000000-0000-0000-0000-000000000000",
"currency": "USD",
"amount": "25.00",
"expiration_seconds": 900,
"webhook_url": "https://your-server/webhooks/ethpayserver"
}'
Fields
| Field | Required | Notes |
|---|---|---|
store_id | yes | The store this invoice belongs to |
currency | yes | "USD" and other fiat codes, or a crypto asset symbol directly for testing |
amount | yes | Always the currency’s standard human-readable unit — "25.00" for USD, "0.1" for ETH. Never pre-convert to the smallest unit; the server does that internally |
expiration_seconds | no | Defaults to 900 (15 minutes) |
customer_email | no | Used for a payment receipt, if set |
redirect_url | no | Where the customer lands after paying |
webhook_url | no | Where payment events are delivered — see Webhooks |
metadata | no | Arbitrary JSON, echoed back on the invoice |
The full request and response schema, including every field’s type, is in the API Reference.
What happens next
- The server picks (or derives) a payment address from the store’s configured wallet and registers it with the payment monitor.
- The customer sends funds to that address.
- The monitor detects the transfer, and the invoice moves through its status lifecycle as confirmations accumulate.
- If a
webhook_urlwas set, you get notified at each step — see Webhooks.
Checking status
curl https://your-server/invoices/{invoice_id}/status \
-H "Authorization: Bearer ak_your_api_key"
An API key scoped to cancreateinvoice and canviewinvoices is enough to both create and
check the status of invoices — see API Keys & Permissions for the full
permission list and how scoping works.