Create Invoice

OpenAPI block

Create Invoice

POST v1/invoice

Creates a new crypto payment invoice. Returns data for QR code and status tracking.

Request Parameters:

Field
Type
Required
Description

orderId

String

Yes

Unique client order ID

blockchain

String

Yes

Blockchain network

tokenSymbol

String

Yes

"USDT"

amount

Number

Yes

Payment amount (1 to 2^53−1)

Supported values for blockchain:

  • blockchain: "bsc", "tron", "eth"

  • tokenSymbol: "USDT".

Example

POST /invoice
Date: Tue, 09 Apr 2025 12:00:00 GMT
Authorization: HMAC merchant_001:abc123xyz456
{
  "orderId": "418229696d28428f",
  "tokenSymbol": "USDT",
  "blockchain": "tron",
  "amount": 100.25
}

Response (200 OK):

Field
Type
Description

id

String

Unique invoice ID

status

String

"pending"

address

String

Wallet address

blockchain

String

Blockchain network

tokenSymbol

String

Payment token

amount

Number

Unique payment amount

orderId

String

Client order ID

merchantId

String

Your merchant ID

expiresAt

String (ISO 8601)

Expiration (5 min)

createdAt

String (ISO 8601)

Creation timestamp

Response

Errors:

Code
Description
Reason

400

Invalid parameters

Bad input (unsupported network/token)

400

Unsupported blockchain

Network not enabled for your store

403

Unauthorized

HMAC signature error or expired

503

Amount generation failure

No available unique amounts

500

Internal server error

Server-side problem

Note: The method is idempotent, a repeat request with the same merchant_id and orderId will return an existing invoice.

GitBook's OpenAPI block is powered by Scalar, so you can test your APIs directly from your docs.

Last updated