Create Invoice

Example

{
    "code": "OK",
    "msg": "",
    "data": {
        "address": None,
        "app_id": "de5076a5-71aa-4a4a-a35f-bdb424af5658",
        "confirm_speed": "Medium",
        "create_time": "2023-05-05T03:35:19",
        "error_status": "None",
        "exchange_rate": 0.0,
        "expiration_time": "2023-05-05T03:55:19",
        "invoice_id": "KrRnGKYgy8vXvqXtscG4AT",
        "invoice_url": "https://app.unipayment.io/i/KrRnGKYgy8vXvqXtscG4AT",
        "network": None,
        "order_id": "5f166a9592e54babad01c26b243b69be",
        "paid_amount": 0.0,
        "pay_amount": 0.0,
        "pay_currency": "USDT",
        "price_amount": 100.0,
        "price_currency": "USD",
        "status": "New"
    }
}

Description

NameTypeDescription
app_idstringPayment App Id
invoice_idstringUniPayment Invoice Id.
price_amountfloatSame as request.
price_currencystringSame as request.
networkstringDefined blockchain network in which buyer will send the payment.
addressstringDefined blockchain address in which buyer will send the payment
pay_amountfloat
pay_currencystringCrypto currency buyer will send the payment
exchange_ratefloatExchange Rate between Price Currency and Pay Currency.
expiration_timedatetimeInvoice pay window, after this time Invoice's status will changed to expired.
invoice_urlstringWeb address of invoice, merchant can use this url for checkout or prepare owner checkout page using response data.
networkstringBlockchain network specified
confirm_speedstringBlockchain confirm speed.
statusstringInvoice status
error_statusstringInvoice error status
order_idstringOrder Id

Get Invoice

Example

{
    "code": "OK",
    "msg": "",
    "data": {
        "address": None,
        "app_id": "de5076a5-71aa-4a4a-a35f-bdb424af5658",
        "confirm_speed": "Medium",
        "create_time": "2023-05-05T03:35:19",
        "error_status": "None",
        "exchange_rate": 0.0,
        "expiration_time": "2023-05-05T03:55:19",
        "invoice_id": "KrRnGKYgy8vXvqXtscG4AT",
        "invoice_url": "https://app.unipayment.io/i/KrRnGKYgy8vXvqXtscG4AT",
        "network": None,
        "order_id": "5f166a9592e54babad01c26b243b69be",
        "paid_amount": 0.0,
        "pay_amount": 0.0,
        "pay_currency": "USDT",
        "price_amount": 100.0,
        "price_currency": "USD",
        "status": "New"
    }
}

Description

NameTypeDescription
app_idstringPayment App Id
invoice_idstringUniPayment Invoice Id.
price_amountfloatSame as request.
price_currencystringSame as request.
networkstringDefined blockchain network in which buyer will send the payment.
addressstringDefined blockchain address in which buyer will send the payment
pay_amountfloatAmount to be paid in cryptocurrency.
pay_currencystringCrypto currency buyer will send the payment
paid_amountfloatAmount already paid in cryptocurrency.
exchange_ratefloatExchange Rate between Price Currency and Pay Currency.
expiration_timedatetimeInvoice pay window, after this time Invoice's status will changed to expired.
invoice_urlstringWeb address of invoice, merchant can use this url for checkout or prepare owner checkout page using response data.
networkstringBlockchain network specified
confirm_speedstringBlockchain confirm speed.
statusstringInvoice status
error_statusstringInvoice error status
order_idstringOrder Id

Query Invoice

Example

{
  "msg": "",
  "code": "OK",
  "data": {
    "models": [
      {
        "app_id": "94273135-a935-4753-937b-c293987d44c8",
        "invoice_id": "67af9a33-09d9-4d57-b9af-b5e20836c886",
        "order_id": "ORDER_123456",
        "price_amount": 10.86,
        "price_currency": "USD",
        "network": "NETWORK_TRX",
        "address": "TFmHeEqTrUQ4mFRewsc9YwYzgeLaA3oqAy",
        "pay_currency": "USDT",
        "pay_amount": 10.86,
        "exchange_rate": 1,
        "paid_amount": 0,
        "confirmed_amount": 0,
        "create_time": "2022-02-28T08:29:59",
        "paid_time": null,
        "confirm_time": null,
        "complete_time": null,
        "expiration_time": "2022-02-28T08:59:59",
        "confirm_speed": "Medium",
        "status": "Expired",
        "error_status": "None"
      },
      {
        "app_id": "94273135-a935-4753-937b-c293987d44c8",
        "invoice_id": "eeced5e7-57cc-43c0-8be6-828e7c790e81",
        "order_id": "ORDER_123456",
        "price_amount": 10.86,
        "price_currency": "USD",
        "network": "NETWORK_TRX",
        "address": "TFmHeEqTrUQ4mFRewsc9YwYzgeLaA3oqAy",
        "pay_currency": "USDT",
        "pay_amount": 10.86,
        "exchange_rate": 1,
        "paid_amount": 0,
        "confirmed_amount": 0,
        "create_time": "2022-02-28T08:26:43",
        "paid_time": null,
        "confirm_time": null,
        "complete_time": null,
        "expiration_time": "2022-02-28T08:56:44",
        "confirm_speed": "Medium",
        "status": "Expired",
        "error_status": "None"
      },
    ],
    "page_index": 1,
    "page_size": 10,
    "total": 7,
    "page_count": 1
  }
}

Description

NameTypeDescription
app_idstring

Create Payout

Example

{
	"code": "OK",
	"msg": "",
	"data": {
		"payout_id": "3599c812-1bfa-4859-b298-5b25f9a2035d",
		"network": "NETWORK_BSC",
		"asset_type": "BNB",
		"status": "Pending",
		"create_time": "2023-05-17T12:26:47",
		"update_time": "2023-05-17T12:26:47",
		"items": [{
			"address": "0xa7ae41cad1f20dfef0a199c219d34496feea0786",
			"amount": 0.03,
		}]
	}
}

Description

NameTypeDescription
payout_idstringUniPayment Payout Id.
networkstringDefined blockchain network used in payout .
asset_typestringAssetType used in payout, such as BTC, ETH, USDT, USC, BNB and son.
statusstringStatus of payout, [Pending, Processing, Complete].
itemsArrayPayout destination array, address and amount item.
create_timedatetimeCreate time of payout.
update_timedatetimeUpdate time of payout.

Get Payout

Example

{
	"Code": "OK",
	"Msg": "",
	"Data": {
		"payout_id": "f3daf6d9-7778-4ce1-980d-ffbc83ce4133",
		"network": "NETWORK_BSC",
		"asset_type": "BNB",
		"status": "Complete",
		"create_time": "2023-05-17T02:59:58",
		"update_time": "2023-05-17T02:59:58",
		"items": [{
			"address": "0xa7ae41cad1f20dfef0a199c219d34496feea0786",
			"amount": 0.02100000,
			"hash": "0x644fc4a1516ecc8873c2f7ed53993097f9e92b83dc3137fda14316daf78a21c4"
		}, {
			"address": "0x61575d3e27347e9130af44dbf4a7feeef95d8829",
			"amount": 0.01100000,
			"hash": "0xd425fd192bbda2c645ff31ed5ee2b080501456c980dbf3d456c7484039ee7a4b"
		}, {
			"address": "0x97db522c21cf681c8a1a962856c5ac06aadcb2c7",
			"amount": 0.03100000,
			"hash": "0x644fc4a1516ecc8873c2f7ed53993097f9e92b83dc3137fda14316daf78a21c4"
		}]
	}
}

Description

NameTypeDescription
payout_idstringUniPayment Payout Id.
networkstringDefined blockchain network used in payout .
asset_typestringAssetType used in payout, such as BTC, ETH, USDT, USC, BNB and son.
statusstringStatus of payout, [Pending, Processing, Complete].
create_timedatetimeCreate time of payout.
update_timedatetimeUpdate time of payout.
NameTypeDescription
addressstringDefined blockchain address used in payout
amountfloatDefined amount used in payout.
hashstringTransaction hash of this payout.

Query Payout

Example

{
	"code": "OK",
	"msg": "",
	"data": {
		"models": [{
			"payout_id": "4a67ef06-a1d4-40f6-8b41-0514ecc51ce3",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Processing",
			"create_time": "2023-05-17T08:10:32",
			"update_time": "2023-05-17T08:10:32"
		}, {
			"payout_id": "636a3187-2b38-48d8-bc67-9d11a1198fc3",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Processing",
			"create_time": "2023-05-17T07:24:42",
			"update_time": "2023-05-17T07:24:42"
		}, {
			"payout_id": "e9a00427-cfaa-4699-b4b6-56a9ad6f1348",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Processing",
			"create_time": "2023-05-17T07:23:09",
			"update_time": "2023-05-17T07:23:09"
		}, {
			"payout_id": "8d1fa7c3-e774-4e81-be37-6cb4be6e94e0",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Processing",
			"create_time": "2023-05-17T07:12:46",
			"update_time": "2023-05-17T07:12:46"
		}, {
			"payout_id": "0e2111e4-cddb-49ed-a1c6-4ae0a738baf5",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Complete",
			"create_time": "2023-05-17T07:02:10",
			"update_time": "2023-05-17T07:02:10"
		}, {
			"payout_id": "8a2557c1-74c6-4fe9-bd1e-33b573518e1c",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Complete",
			"create_time": "2023-05-17T05:26:01",
			"update_time": "2023-05-17T05:26:01"
		}, {
			"payout_id": "f3daf6d9-7778-4ce1-980d-ffbc83ce4133",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Complete",
			"create_time": "2023-05-17T02:59:58",
			"update_time": "2023-05-17T02:59:58"
		}, {
			"payout_id": "9394c412-4f74-4cfb-b790-cf956abbb7f3",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Complete",
			"create_time": "2023-05-17T02:39:59",
			"update_time": "2023-05-17T02:39:59"
		}, {
			"payout_id": "a619678d-7d79-4604-851b-12b697828486",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Complete",
			"create_time": "2023-05-17T02:37:03",
			"update_time": "2023-05-17T02:37:03"
		}, {
			"payout_id": "4d33a0a3-061d-487e-bd36-ac7bac26273b",
			"network": "NETWORK_BSC",
			"asset_type": "BNB",
			"status": "Complete",
			"create_time": "2023-05-17T02:05:21",
			"update_time": "2023-05-17T02:05:21"
		}],
		"page_no": 1,
		"page_size": 10,
		"total": 13,
		"page_count": 2
	}
}{}

Description

NameTypeDescription
payout_idstringUniPayment Payout Id.
networkstringDefined blockchain network used in payout
asset_typestringAssetType used in payout, such as BTC, ETH, USDT, USC, BNB and son.
statusstringStatus of payout, [Pending, Processing, Complete].
create_timedatetimeCreate time of payout.
update_timedatetimeUpdate time of payout.