Create Invoice
Steps
Merchant's backend sends request to Get List Available Currency to be set on Invoice.
Merchant's backend sends request to Create Invoice API in order to retrieve payment URL.
Share the payment URL to Customer and then wait for them to proceed to payment.
Merchant gets callback of payment status changes and need to handle it accordingly.
Merchant can also use other API endpoints to manage Invoice. For example to Get List & Detail Invoice as needed.
Host URL
Environment | Url |
---|---|
Sandbox | |
Production |
Get Available Currency API
Request :
Endpoint : /v1/invoices/available-currecny
HTTP Method : GET
Header :
Authorization: Basic ENCODED_KEY
ENCODED_KEY
value is result of Base64Encode("apiKey"+":"+"secretKey"
)
Response :
Sample Success Response :
HTTP Status Code : 200
Response JSON Body Details :
Property | Descriptions |
---|---|
| Merchant Currency ID |
| Priority available currency |
| Currency ID |
| Currency Status |
| Currency code |
| Currency name |
| Currency image url |
| Currency Smart Contract Address |
| Blockchain Code |
| Merchant Base Currency |
| Minimum Price in Fiat |
Create Invoice API
Request :
Endpoint : /v1/invoices
HTTP Method : POST
Header :
Accept : application/json
Content-Type:application/json
Authorization: Basic ENCODED_KEY
ENCODED_KEY
value is result of Base64Encode("apiKey"+":"+"secretKey"
)
Request JSON Body :
Fee Calculation:
:
transaction fee = 0.8 * invoice_amount
Example :
Invoice Amount : 5 ETH
Merchant's balance : 0.2 * 5 ETH = 1 ETH
Note : Merchant is able to custom transaction fee by contact Our Support
Request JSON Body Details :
Parameter | Required | Type | Description |
---|---|---|---|
| required | string | Unique Identifier for your invoice |
| optional | string | invoice example description |
| required | integer | Amount Invoice in Fiat (IDR, USD) |
| required | string | Expired date of invoice |
| optional | string | Customer's email |
| optional | string | Customer's phone number |
| optional | string | Payment Currency (Ex: ETH, TRX, zUSD, etc). This data is taken from property |
Response :
Sample Success Response :
HTTP Status Code : 200
Response JSON Body Details :
Property | Descriptions |
---|---|
| Invoice Id |
| Reference ID |
| Type indicates source of invoice created |
| Expired date of invoice |
| Next date of amount updated, it can be |
| Customer's email |
| Customer's phone number |
| Payment Currency (Ex: ETH, TRX, zUSD, etc) |
| Checkout Page URL |
| Merchant's Base Currency (Ex: IDR, USD) |
| Amount Invoice in Fiat |
| Amount Invoice in Crypto |
| Merchant's Payment Method |
| Fee of Invoice |
| Date of invoice is paid by customer it can be nullable if invoice is not already paid |
| Date of invoice already in merchant's balance it can be nullable if invoice is not already in balance |
| Date of invoice created |
| Date of invoice last updated |
| Status of invoice |
Last updated