API Reference
REST API for creating and querying charges.
All API endpoints are served on port 4000 and require an Authorization: Bearer <API_SECRET_KEY> header unless noted otherwise.
Base URL
Charges
Create a charge
Creates a new payment charge. The processor assigns an HD wallet address (shared across all configured chains) and returns payment details including per-chain token info.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in USD |
customerEmail | string | No | Customer email for records |
metadata | object | No | Arbitrary key-value data stored with the charge |
Example request
Example response
Error codes
| Code | Meaning |
|---|---|
NO_CHAINS_CONFIGURED | No chains are configured in the server config |
NO_AVAILABLE_WALLETS | The escrow wallet pool is exhausted |
Get a charge
Returns the current state of a charge, including received token and amount if payment has been detected.
Example response
Payment statuses
| Status | Description |
|---|---|
PENDING | Waiting for payment |
COMPLETED | Full payment received |
EXPIRED | Charge expired before payment |
Get a quote
Returns the exact token amount required to pay for a specific chain and token combination. Exchange rates are cached and refreshed on a configurable interval (default 5 minutes).
Query parameters
| Parameter | Description |
|---|---|
chain | Chain key, e.g. eth-sepolia |
token | Token symbol, e.g. ETH or USDC |
Example request
Example response
List configured chains
Returns all chains and tokens the server is configured to accept. No authentication required.
Example response
Webhooks
Register a webhook
Registers a URL to receive HTTP POST callbacks when charge status changes.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS endpoint to call |
events | string[] | No | Event types to subscribe to (defaults to all) |
secret | string | No | Shared secret for HMAC signature verification |
Supported events
| Event | Triggered when |
|---|---|
charge.completed | Payment fully received |
charge.expired | Charge expired |
Webhook payload