Simple, privacy-first integration for modern crypto businesses.
Secure your requests using the x-api-key header. Your key consists of your Business ID and a Secret Key separated by a dot.
x-api-key: 97ea8012-820e...pk_live_51P...
Initialize a payment and receive a secure checkout URL.
| Parameter | Type | Description |
|---|---|---|
| amount | string | Amount as string with decimals (e.g. "100.00" for $100) |
| currency | string | Currency symbol ("USD" or "EUR") |
| description | string | OPTIONAL Payment description (max 100 characters) |
| Field | Type | Description |
|---|---|---|
| id | string | Unique invoice identifier (UUID) |
curl -X POST https://layerpay.org/invoice/create \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_BUSINESS_ID.SECRET" \
-d '{
"amount": "100.00",
"currency": "USD"
}'
# Response:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Poll for the real-time status of a specific invoice.
| Field | Type | Description |
|---|---|---|
| id | string | Invoice identifier |
| status | string | Current invoice status |
| expires_at_ts | integer | Unix timestamp when invoice expires |
curl https://layerpay.org/invoice/a1b2c3d4-e5f6-7890-abcd-ef1234567890/status
# Response:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Pending",
"expires_at_ts": 1707523200
}
Use sandbox mode to test your integration without real transactions. Sandbox uses a separate database — accounts, businesses, and invoices are independent from production.
| Feature | Sandbox behavior |
|---|---|
| Base URL | sandbox.layerpay.org instead of layerpay.org |
| Registration | Separate account required — mainnet credentials don't work in sandbox |
| API Keys | Sandbox business keys only work against the sandbox API |
| Payments | Invoices auto-confirm — no blockchain transaction needed |
| Withdrawals | Disabled — returns 400 Bad Request |
# Use sandbox URL instead of production
curl -X POST https://sandbox.layerpay.org/invoice/create \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_SANDBOX_BUSINESS_ID.SECRET" \
-d '{
"amount": "10.00",
"currency": "USD"
}'
# Response:
{
"id": "f7a1b2c3-d4e5-6789-abcd-ef0123456789"
}
https://sandbox.layerpay.org/invoice/create with your sandbox API keyhttps://sandbox.layerpay.org/payment?id={invoice_id}"Confirmed" automatically