IPNs (Instant Payment Notifications) are sent to the notify_url provided by merchants when creating the invoice, when order status is changed to paid, confirmed and complete.

🚧

1.Notification sent by gateway is in POST Method.
2.Body is a JSON-formatted string (content-Type: application/json)

Invoice Status Change Process

Invoice is paid in full

IndexEventStatuserror_statusDescription
1invoice_createdNewNoneInvoice is created
2invoice_paidInFullPaidNoneBuyer make the payment
3invoice_confirmedConfirmedNonePayment is confirmed by some blocks
4invoice_completedCompleteNonePayment is completed

Invoice is expired without payment

IndexEventStatuserror_statusDescription
1invoice_createdNewNoneInvoice is created
2invoice_expiredExpiredNoneInvoice is expired

Invoice is over paid

IndexEventStatuserror_statusDescription
1invoice_createdNewNoneInvoice is created
2invoice_paidInFullPaidPaidOverBuyer make the payment(OverPay)
3invoice_confirmedConfirmedPaidOverPayment is confirmed by some blocks
4invoice_completedCompletePaidOverPayment is completed

Invoice is partial paid

IndexEventStatuserror_statusDescription
1invoice_createdNewNoneInvoice is created
2invoice_expiredExpiredPaidPartialPayment expired with PaidPartial

Example

{
  "ipn_type": "invoice",
  "event": "invoice_created",
  "app_id": "de5076a5-71aa-4a4a-a35f-bdb424af5658",
  "invoice_id": "XjwyQQanwVVUtJXVMGXtCe",
  "order_id": "#0001",
  "price_amount": 10,
  "price_currency": "USD",
  "network": null,
  "address": null,
  "pay_currency": "USDT",
  "pay_amount": 0,
  "exchange_rate": 0,
  "paid_amount": 0,
  "confirmed_amount": 0,
  "refunded_price_amount": 0,
  "create_time": "2023-05-05T03:54:29.5708901Z",
  "expiration_time": "2023-05-05T15:54:29.5708934Z",
  "status": "New",
  "error_status": "None",
  "ext_args": null,
  "transactions": null,
  "notify_id": "714c8f9e-b06d-49b9-9ebc-203f7cadcaa0",
  "notify_time": "2023-05-05T03:55:49.1566646Z"
}

Description

NameTypeDescription
ipn_typestringIPN type, invoice is for invoice notification.
eventstringEvent type for invoice.
app_idstringMerchant Payment App ID.
invoice_idstringUniPayment Invoice ID.
price_amountfloatSame as request.
price_currencystringSame as request.
pay_amountfloatThis is the amount buyer will send the crypto payment.
pay_currencystringCrypto currency buyer will send the payment
networkstringBlockChain from which buyer will send the payment
addressaddressThe address
exchange_ratefloatThe exchange rate from pay_currency to price_currency.
paid_amountfloatThe amount of cryptocurrency (defined by pay_currency) paid by the buyer.
confirmed_amountfloatThe amount of cryptocurrency (defined by pay_currency) confirmed by the blockchain network.
refunded_price_amountfloatThis is the amount merchant refunded.
create_timedatetimeInvoice creation time.
expiration_timedatetimeInvoice expiration time.
statusstringInvoice status.See InvoiceStatus
error_statusstringInvoice error status.See InvoiceErrorStatus
transactionsobject array
notify_idstringNotification unique Id.
notify_timedatetimeNotification send time.