Nusagate Docs
Search
K
Comment on page

Manage Invoice

Overview

As a Merchant, you can manage your invoices by fetching lists and getting detailed information.

List Invoice

Request :
Endpoint : /v1/invoices
HTTP Method : GET
Header :
Authorization: Basic ENCODED_KEY
ENCODED_KEY value is result of Base64Encode("apiKey"+":"+"secretKey")
Params :
page : Current Page (Default : 1 ) perPage : Limit on Per Page (Default : 10)
Response :
Sample Success Response :
HTTP Status Code : 200
{
"data": [
{
"id": "854e7b3f-ba8f-4696-8766-734ec42e1cbf",
"slug": "INV-220207672-TJBXYY",
"type": "INVOICE_MANUAL",
"externalId": "NSGT-123472",
"dueDate": "2022-02-07T19:26:07.255Z",
"email": "[email protected]",
"payCurrency": "ETH",
"price": 12000000,
"amount": 0.269045,
"createdAt": "2022-02-07T06:11:33.343Z",
"status": "PAID"
}
],
"meta": {
"page": 1,
"perPage": 10,
"totalData": 1,
"message": "Success Get List Invoice",
"statusCode": 200,
"totalPage": 1
}
}
Response JSON Details :
Property
Description
id
Invoice ID
slug
Reference ID
type
A type of invoice between INVOICE_API and INVOICE_MANUAL that represents the source of invoice be created
externalId
Unique identifier for your invoice
dueDate
Expired date of invoice
email
Customer email
payCurrency
Payment Currency
price
Amount Invoice in fiat (IDR, USD)
amount
Amount Invoice in Crypto
createdAt
Date invoice created
status
status of invoice

Detail Invoice

Request :
Endpoint : /v1/invoices/:id
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
{
"data": {
"id": "c236fec8-19d6-4ed6-b883-969e0f1da739",
"slug": "INV-220201575-BLMKFL",
"type": "INVOICE_MANUAL",
"externalId": "ECOMM_123456",
"description": "...",
"dueDate": "2022-02-01T19:26:07.255Z",
"expiredAmountAt": null,
"email": "[email protected]",
"payCurrency": "ETH",
"paymentLink": "https://checkout.dev.nusagate.com/?id=c236fec8-19d6-4ed6-b883-969e0f1da739",
"baseCurrency": "IDR",
"amount": 0.3,
"paymentType": "BALANCE",
"fee": 0.12,
"paidAt": "2022-02-01T09:43:46.000Z",
"completedAt": "2022-02-01T09:47:40.423Z",
"createdAt": "2022-02-01T09:40:25.220Z",
"details": {
"status": "PAID",
"receivedAmount": 0.3
},
"updatedAt": "2022-02-01T09:47:40.642Z",
"status": "COMPLETED",
"phoneNumber": "085875517882",
"price": 12000000,
"qrCode": "ethereum:0xd465ec38c0d1c7b34a00379abee496dfb8815b4f?amount=0.3",
"paymentAddress": {
"id": "d549b721-6afd-4124-a1af-796bc56dcc7f",
"address": "0xD465EC38c0d1C7b34A00379aBEE496dfB8815b4f",
"blockchainCode": "ETHEREUM",
"isStableCoin": false
}
},
"meta": {
"message": "Get invoice success",
"statusCode": 200
}
}
Response JSON Body Details :
Property
Description
id
Invoice ID
slug
Reference ID
type
Type indicates source of invoice created
externalId
Unique Identifier for your invoice
description
invoice example description
dueDate
Expired date of invoice
expiredAmountAt
Next date of amount updated, it can be nullable if value of payCurrency is null
email
Customer's email
payCurrency
Payment Currency (Ex: ETH, TRX, zUSD, etc)
paymentLink
Checkout Page URL
phoneNumber
Customer's phone number
baseCurrency
Merchant's Base Currency (Ex: IDR, USD)
amount
Amount Invoice in Crypto
paymentType
Merchant's Payment Method
fee
Fee of Invoice
paidAt
Date of invoice is paid by customer it can be nullable if invoice is not already paid
completedAt
Date of invoice already in merchant's balance it can be nullable if invoice is not already in balance
createdAt
Date of invoice created
price
Amount Invoice in Fiat
updatedAt
Date of invoice last updated
status
Status of invoice
qrCode
QR Code Payload
details
Detail of status Invoice and receivedAmount from Customer
paymentAddress
Detail of payment address