KukaPay Document
/
/
list_invoices

List Invoices

Retrieving information of all placed invoices.

Reqeust

Endpoint:

GET https://api.kukapay.com/v1/invoice

Query Params:

field type description
page int page number
size int page size
sort string sort orders by fields

Response

Status Code

  • 200: success
  • 500: internal error

Response Body

field type description
total int total records
page int current page number
size int page size
invoices array array of invoice objects

Invoice object defined as:

field type description
id int generated invoice id
merchant string operation address of the merchant
orderId string order id assigned by merchant
orderDesc string order description
orderAmount double total amount to pay of the order, in orderCurrency
orderCurrency string orderAmount is in this currency
TokenId int payment token id
tokenAmount string payment amount in TokenId
recipientAddress string payment recipient address
recipientKey string payment recipient key for later sweep operation
paidAmount double received amount in selected token
paymentUrl string payment url on kukapay.com
state int invoice state
createAt int time when invoice created
expireAt int time when invoice payment will expire

Example

Request:

curl https://api.kukapay.com/api/invoice?page=1&size=10

Response:

{
  "total": 30,
  "page": 1,
  "size": 10,
  "invoices": [
    {
      "id": 1728,
      "merchant": "0xFDeda15e2922C5ed41fc1fdF36DA2FB2623666b3",
      "orderId": "a1b33ee88e6d",
      "orderDesc": "iPhone 12 plus 256G",
      "orderAmount": 7123.45,
      "orderCurrency": "CNY",
      "tokenAmount": 1207.63,
      "tokenSymbol": "USDT",
      "paidAmount": 1207.63,
      "recipientAddress": "0x7A579F158E430c0B52C30F62C7eb60B079Ec331C",
      "recipientKey": "6e8b8afd3f6a287e",
      "paymentUrl": "https://www.kukapay.com/invoice/1728",
      "state": 4
    },
    ...
  ]