Retrieve Payment Invoice
Submission URL:
https://openapi.basicex.com/v2/invoices/${invoiceId}
Request Method: GET
Content-Type:
application/json
Request Parameters
Parameter | Type | Description |
---|---|---|
invoiceId | string | ID of the payment invoice, used in the query path |
Response Parameters
Parameters returned by BasicEx, please refer to the business requirements for specific values.
Upon a successful order request, the response code is 0000
.
InvoiceObject
Payment invoice return parameters
Field | Type | Description |
---|---|---|
invoiceId | string | Payment invoice order ID |
merOrderId | string | Merchant's internal order number |
fiat | string | ISO 4217 3-digit fiat code |
currency | string | If the payment invoice order restricts the payment currency or selects the payment currency, this field is returned |
currencyInfo | CoinInfo | If the payment invoice order restricts the payment network or selects the payment network, this field is returned View Details |
forcedChain | string | If the payment invoice order restricts the payment network or selects the payment network, this field is returned View Details |
fiatAmount | string | The fiat amount of the payment invoice |
fiatInfo | FiatCurrencyInfo | Fiat details View Details |
description | string | Description of the payment invoice order |
metadata | map | Structured metadata passed in for the merchant to record corresponding data. This field will be returned as is |
payerEmail | string | Customer email on the merchant side, if passed, an email will be sent to this email after the invoice is successfully paid |
merchantCode | string | Merchant code |
merchantName | string | Merchant name |
currencies | List | List of supported cryptocurrency information |
fiatCurrencies | List | List of supported fiat currency information |
paymentInfo | InvoicePaymentInfo | Payment information View Details |
exchangeRate | InvoiceExchangeRate | Exchange rate information |
type | int | Type of the payment invoice order, which is read in XOR form. 1. FIAT_CURRENCY_EXCHANGE : Indicates that the payment invoice is created in the form of fiat currency exchange rate conversion2. FORCE_SELECTED_CHAIN : Indicates that the payment invoice is created in the form of forcibly selecting the public chain, and the currency and payment public chain cannot be changed subsequently, only payments under this chain are supported3. FORCE_SELECTED_COIN : Indicates that the payment invoice is created in the form of forcibly selecting the currency, and the currency cannot be changed subsequently, only payments in this currency are supported |
status | string | Current status of the payment invoice (created: indicates that the payment invoice has been created but not paid, completed: indicates that the payment invoice has been paid and completed, expired: indicates that the payment invoice has expired) |
invoiceTime | long | Timestamp (13 digits) when the payment invoice is created |
expirationTime | long | Timestamp (13 digits) when the payment invoice expires |
cashierUrl | string | The website of the BasicEx cashier corresponding to the payment invoice, which can be used to pay the unpaid order again to avoid users submitting unpaid orders multiple times |
CoinInfo
Currency information
Field | Type | Description |
---|---|---|
currency | string | Currency name |
fullName | string | Full name of currency |
coinIcon | string | Currency icon |
precision | string | Currency precision |
networkList | string | List of public chains supported by the currency |
CoinChainInfo
Public chain information
Field | Type | Description |
---|---|---|
network | string | Public chain name |
fullName | string | Full name of public chain |
contractAddress | string | Contract address |
FiatCurrencyInfo
Fiat currency information
Field | Type | Description |
---|---|---|
fullName | string | Full name of fiat currency |
name | string | Fiat currency name |
symbol | string | Currency symbol |
icon | string | Currency icon |
InvoicePaymentInfo
Invoice order information
Field | Type | Description |
---|---|---|
allowPayment | string | Whether payment is allowed, if true , it means that this payment order allows payment. If false , it means that the precondition is not met, such as: the order has no payment amount/has not selected the currency/has not selected the public chain/address has expired, etc |
payeeAddress | string | Recipient address, the user actually transfers to this address to complete the payment |
network | CoinChainInfo | Network information View Details |
totalAmount | string | The total amount that the user needs to pay |
paidAmount | string | The amount paid by the user |
payeeAddressExpireTime | int | The expiration time of the payment address, in milliseconds. The payment needs to be completed or the payment address needs to be obtained again before the expiration time |