/api/v1/invoices≡ NowPayments POST /v1/invoiceCreate an invoice
Creates a payment invoice for the requested amount on the requested chain. Nowpay generates an HD-derived deposit address (BIP44 m/44'/60'/0'/0/<index>), queues an invoice.waiting webhook, and returns the hosted checkout URL your customer can be redirected to. The deposit address is unique per invoice — never reused.
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | string | yes | USDT amount (e.g. "50.00"). Numeric string — never a JS number. |
| network | string | yes | One of: bsc, polygon, arbitrum, optimism, base. |
| external_id | string | no | Merchant-internal order ID for reconciliation. |
| success_url | string | no | Redirect URL after successful payment. |
| cancel_url | string | no | Redirect URL after cancellation/timeout. |
| metadata | object | no | Arbitrary JSON metadata stored with the invoice. |
curl -X POST https://nowpay.finance/api/v1/invoices \
-H "x-api-key: sk_live_4f3c2b1a9e8d7c6b5a4f3e2d1c0b9a8f" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 9b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e" \
-d '{
"amount": "50.00",
"network": "polygon",
"external_id": "order_12345",
"success_url": "https://shop.example.com/thanks",
"cancel_url": "https://shop.example.com/cart"
}'{
"id": "inv_abc123",
"status": "waiting",
"address": "0x7d5a3f9c2b1e8a4d6f0c2b5a7e9d1f3c4b2a8e6d",
"amount": "50.00",
"network": "polygon",
"expires_at": "2026-01-01T12:00:00.000Z",
"checkout_url": "https://nowpay.finance/i/inv_abc123"
}| Code | Status | Description |
|---|---|---|
| invalid_amount | 400 | amount missing or not a positive numeric string. |
| invalid_network | 400 | network is not a supported chain code. |
| network_inactive | 400 | chain exists in config but is not active. |
| idempotency_conflict | 409 | Idempotency-Key reused with a different body. |
