Invoices
Use the endpoints below to create new invoices. When a new invoice is created, the "Created" status is assigned to it.
Once the invoice is created, the backend begins tracking incoming payments on the blockchain and updates the status and other attributes accordingly.
The following statuses could be assigned to an invoice:
Status | Description |
---|---|
Created | Initial status for new invoices |
Paid or SimplePaid | The payment was successfully processed on the blockchain |
OverPaid | Error, the amount provided by the customer is greater than the amount of invoice |
UnderPaid | Error, the amount provided by the customer is lower than the amount of invoice |
Expired | Error, the invoice is expired and can no longer be processed |
Invalid | Generic internal error during invoice processing |
Create an invoice
POST
<api>/integration/invoices
Create a new invoice returning its identifier.
Headers
Name | Type | Description |
---|---|---|
x-api-key* | string | API Key |
x-api-sig* | string | Signature created using API Secret |
x-api-ts* | string | Timestamp of the request |
Request Body
Name | Type | Description |
---|---|---|
metadata | string | Custom metadata for invoice |
amount* | string | Amount in tokens, e.g "100.12 btBUSD" |
expiresAt* | string | Date/time when invoice expires (in ISO 8601 format) |
See full example with signature creation.
See the list of supported tokens for amount value.
You can get invoice details and status using the method below.
Get invoice
GET
<api>/integration/invoices/<id>
Returns the invoice details by id.
Path Parameters
Name | Type | Description |
---|---|---|
id* | string | Invoice Id (uuid) |
Last updated