Skip to content

Update Payment Invoice

Submission URL: https://openapi.basicex.com/v2/invoices/${invoiceId}

Request Method: PUT

Content-Type: application/json

Request Parameters

ParameterTypeDescription
currencystringCryptocurrency to be used for payment, e.g., USDT, BTC, etc. View Currency List
chainstringSpecify a particular blockchain, e.g., TRC20, ERC20, etc. If this parameter is passed, currency is a required parameter. View Blockchain List
payerEmailstringCustomer email on the merchant side. If provided, an email will be sent to this address after successful payment of the invoice.
redirectUrlstringAfter the user successfully pays at the cashier, they will be redirected to this address. This address must start with https or http.
ignoreParameterFailedboolIgnore 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

FieldTypeDescription
invoiceIdstringPayment invoice order ID
merOrderIdstringMerchant-side internal order number
fiatstringISO 4217 3-character fiat code
currencystringIf the payment invoice order restricts the payment currency or selects the payment currency, this field is returned
currencyInfoCoinInfoIf the payment invoice order restricts the payment network or selects the payment network, this field is returned
See Details
forcedChainstringIf the payment invoice order restricts the payment network or selects the payment network, this field is returned
See Details
fiatAmountstringFiat amount of the payment invoice
fiatInfoFiatCurrencyInfoFiat details
See Details
descriptionstringDescription of the payment invoice order
metadatamapStructured metadata passed in for the merchant's own record
payerEmailstringCustomer email on the merchant side. If provided, an email will be sent to this address after successful payment of the invoice.
merchantCodestringMerchant code
merchantNamestringMerchant name
currenciesListList of supported cryptocurrency currency information
fiatCurrenciesListList of supported fiat currency information
paymentInfoInvoicePaymentInfoPayment information
See Details
exchangeRateInvoiceExchangeRateExchange rate information
typeintPayment 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.
statusstringCurrent 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)
invoiceTimelongTimestamp (13 digits) when the payment invoice is created
expirationTimelongTimestamp (13 digits) when the payment invoice expires
cashierUrlstringThe 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

FieldTypeDescription
currencystringCurrency name
fullNamestringFull name of the currency
coinIconstringCurrency icon
precisionstringCurrency precision
networkListstringList of public chains supported by the currency

CoinChainInfo

Public chain information

FieldTypeDescription
networkstringName of the public chain network
fullNamestringFull name of the public chain network
contractAddressstringContract address

FiatCurrencyInfo

Fiat currency information

FieldTypeDescription
fullNamestringFull name of the fiat currency
namestringFiat currency name
symbolstringCurrency symbol
iconstringCurrency icon

InvoicePaymentInfo

Invoice order information

FieldTypeDescription
allowPaymentstringWhether 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.
payeeAddressstringThe recipient's address. The user actually transfers to this address to complete the payment
networkCoinChainInfoNetwork information
See Details
totalAmountstringThe total amount that the user needs to pay
paidAmountstringThe amount paid by the user
payeeAddressExpireTimeintReceiving address expiration time in milliseconds. Payment or reacquiring the receiving address needs to be completed before the expiration time