Create Invoice
POST /invoice/create
Create a new invoice specifying currency, amount, expiration time, and other relevant parameters.
Headers
Content-Type
application/json
X-API-KEY
<token>
Body
amount*
string
Amount of invoice like: 200 USD 0.015 BNB
expires_time*
number
Expiration time of invoice in minutes: 30-1440
label*
string
Label of invoice
postback_url
string
Destination URL for sending post
success_url
string
URL for User after successful payment
fail_url
string
URL for User after failed payment
Important: currency and allowed_currencies cannot be used together.
If you want to lock the invoice to a single currency, set currency and leave allowed_currencies = null.
Otherwise, set currency = null and specify allowed_currencies as a list of at least two currency codes.
Response
{
"id": 0,
"uuid": "string",
"currency": "string",
"tx_hash": "string",
"address": "string",
"amount": 0,
"amount_usd": 0,
"confirmations": 0,
"created_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"is_expired": true,
"is_paid": true,
"label": "string",
"postback_url": "http://example.com",
"success_url": "http://example.com",
"fail_url": "http://example.com",
"url": "http://example.com"
}{
"detail": "Currency does not exist"
}{
"detail": "Invalid amount. Should be in range ({minimum_deposit of currency}-100,000,000)"
}{
"detail": "Invalid expires_time. Should be in range (5-60) minutes"
}{
"detail": "Max length of label is 255 characters"
}{
"detail": "Max length of postback_url is 255 characters"
}{
"detail": "Max length of success_url is 255 characters"
}Example
Last updated