Invoices
The BTPay Cryptocurrency Invoices
The invoicing feature lets you easily request cryptocurrency payments from your customers. You can manage your payments, track your invoice status, and review your transaction history all in one place.
The Invoice Object
id
Number
Unique identifier for the object
uuid
String
Invoice uuid. A UUID (Universal Unique Identifier) is a 128-bit value used to uniquely identify an object or entity
checkoutId
Number
Unique identifier for the checkout object
label
String
An Invoice description
logoUrl
String
Client-provided logo url for the invoice page
invoiceUrl
String
Invoice url
currency
String
The Invoice currency: alphabetic currency code
address
String
Blockchain address
tag
String
Destination tags are unique identification codes used by cryptocurrencies to identify the receiver of a transaction
trackingId
String
Client-provided identifier of the payment in the external system
expectedAmount
Decimal
Expected amount to be paid
paidAmount
Decimal
Actual paid amount
walletId
Number
Wallet id to accept payment in
walletCurrency
String
Alphabetic currency code of the wallet
numberOfPayments
Number
Number of payments for this invoice
blockExplorerUrl
String
Block explorer address url
processingtype
String
Processing type
status
String
The status of the invoice
webhookUrl
String
A client provided callback URI to receive messages by the actions of the invoice
createdAt
Date
Time at which the object was created
updatedAt
Date
Time at which the object was updated
Commerce Solution: Create a new Invoice
POST
/api/v2/invoices/create
Creates a new Invoice for the Commerce Solution
Headers
Accept*
applicaiton/json
Request Body
amount*
String
Invoice amount
currency*
String
Invoice currency
label
String
Invoice label
trackingId*
String
Client provided identifier of the payment in the external system
webhookUrl*
String
Notification URL
{
"data": {
"id": 13501,
"uuid": "5ikSDAEzHYaiPogQRaxRRBYt",
"checkoutId": null,
"label": "ETH Mu invoice",
"logoUrl": "https://yourdomain.com/logo.png",
"invoiceUrl": "https://pay.unixpay.com/invoice/5ikSDAEzHYaiPogQRaxRRBYt",
"currency": "ETH",
"address": "0x687aE53aa5Ed79375C72e601B2a038F046845Def",
"tag": null,
"trackingId": "A-219234-E",
"expectedAmount": "1",
"paidAmount": "0",
"walletId": 27,
"walletCurrency": "USDT_TRX",
"numberOfPayments": null,
"blockExplorerUrl": "https://etherscan.io/tx/",
"processingType": "Floating rate",
"status": null,
"webhookUrl": "https://yourdomain.com/notification",
"createdAt": "2023-04-07T12:35:08.000000Z",
"updatedAt": "2023-04-07T12:35:08.000000Z",
"payments": []
}
}
Crypto Wallets Solution: Create a new Invoice
POST
/api/v2/invoices/crypto-wallets/create
Creates a new Invoice for the Crypto Wallets Solution
Headers
Accept*
applicaiton/json
Request Body
amount*
String
Invoice amount
label
String
Invoice label
trackingId*
String
Client provided identifier of the payment in the external system
walletId*
String
Wallet id to receive funds in
walletCurrency*
String
Wallet currency
webhookUrl*
String
Notification URL
{
"data": {
"id": 13501,
"uuid": "5ikSDAEzHYaiPogQRaxRRBYt",
"checkoutId": null,
"label": "ETH Mu invoice",
"logoUrl": "https://yourdomain.com/logo.png",
"invoiceUrl": "https://pay.unixpay.com/invoice/5ikSDAEzHYaiPogQRaxRRBYt",
"currency": "ETH",
"address": "0x687aE53aa5Ed79375C72e601B2a038F046845Def",
"tag": null,
"trackingId": "A-219234-E",
"expectedAmount": "1",
"paidAmount": "0",
"walletId": 27,
"walletCurrency": "USDT_TRX",
"numberOfPayments": null,
"blockExplorerUrl": "https://etherscan.io/tx/",
"processingType": "Floating rate",
"status": null,
"webhookUrl": "https://yourdomain.com/notification",
"createdAt": "2023-04-07T12:35:08.000000Z",
"updatedAt": "2023-04-07T12:35:08.000000Z",
"payments": []
}
}
Updates an existing invoice
PUT
/api/v2/invoices/update/{id}
Headers
Accept*
application/json
Request Body
label
String
Invoice label
amount
String
Invoice amount
walletId*
String
Wallet id to receive funds in
webhookUrl
String
Notification URL
{
"data": {
"id": 13501,
"uuid": "5ikSDAEzHYaiPogQRaxRRBYt",
"checkoutId": null,
"label": "ETH Mu invoice",
"logoUrl": "https://yourdomain.com/logo.png",
"invoiceUrl": "https://pay.unixpay.com/invoice/5ikSDAEzHYaiPogQRaxRRBYt",
"currency": "ETH",
"address": "0x687aE53aa5Ed79375C72e601B2a038F046845Def",
"tag": null,
"trackingId": "A-219234-E",
"expectedAmount": "2",
"paidAmount": "0",
"walletId": 27,
"walletCurrency": "USDT_TRX",
"numberOfPayments": null,
"blockExplorerUrl": "https://etherscan.io/tx/",
"processingType": "Floating rate",
"status": null,
"webhookUrl": "https://yourdomain.com/notification",
"createdAt": "2023-04-07T12:35:08.000000Z",
"updatedAt": "2023-04-07T12:35:08.000000Z",
"payments": []
}
}
Lists all Invoices
GET
/api/v2/invoices
Returns a list of previously created Invoices. The Invoices are returned in sorted order, with the most recent invoice appearing first. You can optionally provide parameters to filter out the results by time created.
Query Parameters
from
Date
Filter by created time. We use basic ISO 8601 format for mixed date-time: YYYY-MM-DDThh:mm:ss
to
Date
Filter by created time. We use basic ISO 8601 format for mixed date-time: YYYY-MM-DDThh:mm:ss
page
Number
{
"data": [
{
"id": 13501,
"uuid": "5ikSDAEzHYaiPogQRaxRRBYt",
"checkoutId": null,
"label": "ETH Mu invoice",
"logoUrl": "https://yourdomain.com/logo.png",
"invoiceUrl": "https://pay.unixpay.com/invoice/5ikSDAEzHYaiPogQRaxRRBYt",
"currency": "ETH",
"address": "0x687aE53aa5Ed79375C72e601B2a038F046845Def",
"tag": null,
"trackingId": "A-219234-E",
"expectedAmount": "2",
"paidAmount": "0",
"walletId": 27,
"walletCurrency": "USDT_TRX",
"numberOfPayments": null,
"blockExplorerUrl": "https://etherscan.io/tx/",
"processingType": "Floating rate",
"status": null,
"webhookUrl": "https://yourdomain.com/notification",
"createdAt": "2023-04-07T12:35:08.000000Z",
"updatedAt": "2023-04-07T12:35:08.000000Z",
"payments": []
}
],
"links": {
"first": "https://api.business.unixpay.com/api/v2/invoices?page=1",
"last": "https://api.business.unixpay.com/api/v2/invoices?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://api.business.unixpay.com/api/v2/invoices?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://api.business.unixpay.com/api/v2/invoices",
"per_page": 50,
"to": 1,
"total": 1
}
}
Get Invoice by id
GET
/api/v2/invoices/{id}
Retrieves the details of an Invoice that has previously been created. Supply the id and the API will return the corresponding Invoice information.
Path Parameters
id*
Number
Unique identifier for the object.
Headers
Accept*
applicaiton/json
{
"data": {
"id": 13501,
"uuid": "5ikSDAEzHYaiPogQRaxRRBYt",
"checkoutId": null,
"label": "ETH Mu invoice",
"logoUrl": "https://yourdomain.com/logo.png",
"invoiceUrl": "https://pay.unixpay.com/invoice/5ikSDAEzHYaiPogQRaxRRBYt",
"currency": "ETH",
"address": "0x687aE53aa5Ed79375C72e601B2a038F046845Def",
"tag": null,
"trackingId": "A-219234-E",
"expectedAmount": "2",
"paidAmount": "0",
"walletId": 27,
"walletCurrency": "USDT_TRX",
"numberOfPayments": null,
"blockExplorerUrl": "https://etherscan.io/tx/",
"processingType": "Floating rate",
"status": null,
"webhookUrl": "https://yourdomain.com/notification",
"createdAt": "2023-04-07T12:35:08.000000Z",
"updatedAt": "2023-04-07T12:35:08.000000Z",
"payments": []
}
}
Get Invoice by Uuid
GET
/api/v2/invoices/uuid/{uuid}
Retrieves the details of an Invoice that has previously been created. Supply the Uuid and the API will return the corresponding Invoice information.
Path Parameters
Uuid*
String
Unique identifier for the object
Headers
Accept*
applicaiton/json
{
"data": {
"id": 13501,
"uuid": "5ikSDAEzHYaiPogQRaxRRBYt",
"checkoutId": null,
"label": "ETH Mu invoice",
"logoUrl": "https://yourdomain.com/logo.png",
"invoiceUrl": "https://pay.unixpay.com/invoice/5ikSDAEzHYaiPogQRaxRRBYt",
"currency": "ETH",
"address": "0x687aE53aa5Ed79375C72e601B2a038F046845Def",
"tag": null,
"trackingId": "A-219234-E",
"expectedAmount": "2",
"paidAmount": "0",
"walletId": 27,
"walletCurrency": "USDT_TRX",
"numberOfPayments": null,
"blockExplorerUrl": "https://etherscan.io/tx/",
"processingType": "Floating rate",
"status": null,
"webhookUrl": "https://yourdomain.com/notification",
"createdAt": "2023-04-07T12:35:08.000000Z",
"updatedAt": "2023-04-07T12:35:08.000000Z",
"payments": []
}
}
Last updated