Create an Invoice
Create a payment invoice for one of the payment methods available to your merchant account and environment.
Endpoint
Environment
The environment is determined automatically by the API key used to authenticate the request.
crx_test_...
Use a Sandbox API key to create invoices on supported test networks without using real funds.
crx_live_...
Use a Live API key to create production invoices on supported main networks.
Choose a Payment Method
Before creating an invoice, you can retrieve the payment methods currently available for your merchant account and API key environment.
curl https://crptox.com/api/v1/payment-methods \
-H "Authorization: Bearer YOUR_API_SECRET" \
-H "Accept: application/json"
Using the Payment Methods endpoint is recommended instead of hard-coding supported networks or assets in your integration.
Request Body
The blockchain network on which the invoice should receive payment.
tron
ethereum
bsc
polygon
The selected network must be available for your merchant account in the current API key environment.
The token or asset accepted for this invoice.
usdt
usdc
The asset must be enabled on the selected network and available to your merchant account.
The amount that must be paid for the invoice.
Send monetary amounts as strings to preserve decimal precision.
An optional description for the invoice, such as an order number or customer reference.
The number of seconds before the invoice expires.
After the invoice expires, it can no longer be used as an active payment request.
Supported Network & Asset Combinations
The network and asset fields must form a supported payment combination. The following combinations are currently available.
| Network | Assets |
|---|---|
tron
|
usdt
|
ethereum
|
usdt
usdc
|
bsc
|
usdt
|
polygon
|
usdt
usdc
|
Idempotency
Use the Idempotency-Key header when creating invoices to safely retry requests without accidentally creating duplicate invoices.
Idempotency-Key: unique-request-key
Example Request
curl -X POST https://crptox.com/api/v1/invoices \
-H "Authorization: Bearer YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Idempotency-Key: order-1001" \
-d '{
"network": "bsc",
"asset": "usdt",
"amount": "10.000000",
"description": "Order #1001",
"expires_in": 1800
}'
Example Response
{
"invoice": {
"uuid": "9f7c2c4a-0000-0000-0000-000000000000",
"number": "INV-202610050001",
"status": "pending",
"amount": "10.000000",
"asset": "usdt",
"network": "bsc",
"expires_at": "2026-10-05T20:30:00+00:00"
},
"payment": {
"uuid": "1c4a0000-0000-0000-0000-000000000000",
"address": "0xf6222331fe8cd2505561bce3dc4c5837d362b458",
"amount": "10.000000",
"asset": "usdt",
"network": "bsc",
"status": "pending",
"expires_at": "2026-10-05T20:30:00+00:00"
}
}
Testing in Sandbox
Sandbox allows you to test the complete payment flow against supported blockchain test networks before going live.
- 1. Create a Sandbox API key from the Developer section of the merchant dashboard.
- 2. Add an active wallet under Sandbox Wallets for the test network you want to use.
- 3. Create an invoice using your crx_test_ API key and one of the available Sandbox payment methods.
- 4. Send the required test token amount from a test wallet to the payment address returned by the invoice.
- 5. Retrieve the invoice again and observe the payment progress until the invoice reaches its final payment status.