IPN - Invoice Refund

IPNs (Instant Payment Notifications) are sent to the notify_url configured by merchants in the Webhook section when the refund status changes to Approved, Completed, or Failed. This ensures merchants receive real-time updates to manage post-refund processes efficiently.

🚧

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

Invoice Refund Event and Status

#Event NameStatusDescription
1refund_createdNewThe refund request has been created but not yet processed.
2refund_claimedClaimedThe buyer has provided the necessary details for the refund (e.g., address).
3refund_canceledCanceledThe refund request has been canceled by the buyer or the system.
4refund_approvedApprovedThe refund has been reviewed and approved by the administrator.
5refund_rejectedRejectedThe refund request has been rejected by the administrator.
6refund_failedFailedThe refund process encountered an error and could not be completed.

Invoice is expired without payment## Example

{
  "ipn_type": "invoice_refund",
  "event": "refund_approved",
  "refund_id": "HAYNXg2CyBq58WQT15ktm9",
  "invoice_id": "XjKBNrQ2Cd8xCBa9H3yD9a",
  "price_currency": "USD",
  "refund_price_amount": "15.00000000",
  "fee_payer": null,
  "fee": 0,
  "status": "Approved",
  "reason": "",
  "create_time": "2024-11-18T06:20:29",
  "notify_id": "c8c4900a-0e75-44c7-9a64-5849da43d0e6",
  "notify_time": "2024-11-18T06:20:47.9823702Z"
}

Description


invoice_idstringThe unique identifier for the associated invoice from which the refund is initiated.
ipn_typestringThe type of IPN; 'refund' specifies it is for refund notifications.
eventstringThe specific event type associated with the invoice.
refund_idstringThe unique identifier for the refund.
invoice_idstringThe unique identifier for the associated invoice from which the refund is initiated.
price_currencystringThe currency in which the invoice was originally priced.
refund_price_amountfloatThe amount to be refunded to the buyer in the invoice currency.
fee_payerstringSpecifies who will bear the refund fee. Options include MERCHANT (merchant pays the fee) and CUSTOMER (customer pays the fee).
feefloatThe fee amount applied to the refund.
statusstringThe current status of the refund. Possible values include NEW, CLAIMED, APPROVED, REJECTED, CANCELED, COMPLETED, and FAILED.
reasonstringA detailed explanation or note regarding the refund request.
create_timestringThe timestamp when the refund request was created, in ISO 8601 format