Update Payment Invoice
Submission URL: https://openapi.basicex.com/v2/invoices/${invoiceId}
Request Method: PUT
Content-Type:
application/json
Request Parameters
Parameter | Type | Description |
---|---|---|
currency | string | Cryptocurrency to be used for payment, e.g., USDT, BTC, etc. View Currency List |
chain | string | Specify a particular blockchain, e.g., TRC20, ERC20, etc. If this parameter is passed, currency is a required parameter. View Blockchain List |
payerEmail | string | Customer email on the merchant side. If provided, an email will be sent to this address after successful payment of the invoice. |
redirectUrl | string | After the user successfully pays at the cashier, they will be redirected to this address. This address must start with https or http . |
ignoreParameterFailed | bool | Ignore parameter error returns. When this parameter is set to true , parameter errors will be ignored.For example, if a blockchain is specified when creating the payment invoice and parameters such as blockchain and currency are passed when updating the payment invoice, if this parameter is set to true , an error will be ignored. If set to false , these parameters will be ignored and the payment invoice will be updated. |
Response Parameters
Specific values of the BasicEx payment return parameters should be used according to business needs.
InvoiceObject
Payment invoice return parameters
Field | Type | Description |
---|---|---|
invoiceId | string | Payment invoice order ID |
merOrderId | string | Merchant-side internal order number |
fiat | string | ISO 4217 3-character 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 See Details |
forcedChain | string | If the payment invoice order restricts the payment network or selects the payment network, this field is returned See Details |
fiatAmount | string | Fiat amount of the payment invoice |
fiatInfo | FiatCurrencyInfo | Fiat details See Details |
description | string | Description of the payment invoice order |
metadata | map | Structured metadata passed in for the merchant's own record |
payerEmail | string | Customer email on the merchant side. If provided, an email will be sent to this address after successful payment of the invoice. |
merchantCode | string | Merchant code |
merchantName | string | Merchant name |
currencies | List | List of supported cryptocurrency currency information |
fiatCurrencies | List | List of supported fiat currency information |
paymentInfo | InvoicePaymentInfo | Payment information See Details |
exchangeRate | InvoiceExchangeRate | Exchange rate information |
type | int | Payment invoice order type, read by XOR. 1. FIAT_CURRENCY_EXCHANGE : Indicates that the payment invoice is created in the form of fiat currency exchange rate conversion.2. FORCE_SELECTED_CHAIN : Indicates that the payment invoice is created in the form of forced selection of the public chain. The currency and payment public chain cannot be changed later, and payment can only be made under this chain.3. FORCE_SELECTED_COIN : Indicates that the payment invoice is created in the form of forced selection of the currency. The currency cannot be changed later, and only payment in this currency is supported. |
status | string | Current status of the payment invoice (created: The payment invoice is created but not paid, completed: The payment invoice is paid and completed, expired: 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 corresponding BasicEx cashier order URL of the payment invoice. It can be used to pay the unpaid order again to avoid multiple submissions of unpaid orders by users |
CoinInfo
Currency information
Field | Type | Description |
---|---|---|
currency | string | Currency name |
fullName | string | Full name of the 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 | Name of the public chain network |
fullName | string | Full name of the public chain network |
contractAddress | string | Contract address |
FiatCurrencyInfo
Fiat currency information
Field | Type | Description |
---|---|---|
fullName | string | Full name of the 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 prerequisites are not met, such as no payment amount in the order, no selected currency, no selected public chain, or the receiving address has expired. |
payeeAddress | string | The recipient's address. The user actually transfers to this address to complete the payment |
network | CoinChainInfo | Network information See Details |
totalAmount | string | The total amount that the user needs to pay |
paidAmount | string | The amount paid by the user |
payeeAddressExpireTime | int | Receiving address expiration time in milliseconds. Payment or reacquiring the receiving address needs to be completed before the expiration time |