OnlinePay API
  1. Notify
OnlinePay API
  • Introduction
    • Introduction
    • How to Start
    • Country Code
    • Country Info
    • Currency Code
    • Error Code
    • Transfer Order Info Type
    • Transfer Order File Type
    • Per Bank
    • Spei Bank
    • Vietnam Bank
  • Payin
    • OnRamps API
      GET
    • Alipay API
      POST
    • Apple Pay API
      POST
    • Cash App API
      POST
    • Credit Card API
      POST
    • Crypto Pay API
      POST
    • GCash API
      POST
    • Google Pay API
      POST
    • PerTransfer API
      POST
    • PIX API
      POST
    • SEPA API
      POST
    • SPEI API
      POST
    • Union Pay API
      POST
    • WeChat API
      POST
    • CheckOut
      POST
    • CheckOut Payment
      POST
    • Momo API
      POST
    • Vietnam Bank API
      POST
  • Payout
    • Bank Account
    • Card
    • Per Transfer
    • Pix
    • CheckOut
    • Spei Payout
  • Notify
    • Pay Notify WebHook API
    • Refund Notify WebHook API
    • Chargeback Notify WebHook API
    • Card Notify WebHook API
  • Refund
    • Refund API
  • Review
    • Upload SEPA File API
  • Query
    • Query API
    • QueryBalance API
    • QueryOrderList API
    • QueryOrderAmount API
  • Card
    • CreateCardholder API
    • CreateCard API
    • QueryCardInfo API
    • ActiveCard API
    • TopUpCard API
    • CardWithdraw API
    • QueryCardTransaction API
    • QueryCardBalance API
    • FreezeCard API
    • UnFreezeCard API
    • CancelCard API
    • AddVpaScene API
    • UploadFile API
  1. Notify

Chargeback Notify WebHook API

NOTE
If the notifyurl parameter is passed, onlinepay will notify the address of the payment result

Overview#

When a chargeback occurs for an order, the system will send a chargeback notification to the merchant's configured notification URL. Merchants need to implement receiving and verification logic according to this document.

Notification Method#

Request Method: POST
Data Format: application/x-www-form-urlencoded
Character Encoding: UTF-8

Notification Parameters#

ParameterTypeRequiredDescription
tradeNoStringYesPlatform transaction order number
merOrderNoStringYesMerchant order number
codeStringYesNotification type code
messageStringYesNotification message
reasonStringNoChargeback reason description
currencyStringYesChargeback amount currency
amountStringYesChargeback amount
signStringYesSignature value for verifying notification authenticity

Signature Verification#

The system supports two signature methods: MD5 signature and RSA signature

MD5 Signature Verification#

Signature Rules:
1.
Concatenate strings in the following fixed order: tradeNo + merOrderNo + md5Key
2.
Perform MD5 encryption on the concatenated string to get the signature value

RSA Signature Verification#

Applicable Condition: Merchant encryption configuration is "1"
Signature Rules:
1.
Sort all parameters (except sign) by parameter name in alphabetical order
2.
Concatenate parameters in the format key1=value1&key2=value2
3.
Use platform private key to perform SHA256withRSA signature on the concatenated string

Notification URL Configuration#

The system will obtain notification URLs according to the following priority:
1.
Priority 1: Merchant uploaded protest_notify_url during payment
2.
Priority 2: Chargeback Notification URL configured in merchant backend developer center
If both URLs are not configured, no notification will be sent.

Response Requirements#

After receiving the notification, merchants need to return HTTP status code 200 to indicate successful receipt. If other status codes are returned, the system will consider the notification failed.
Success Response Example:
HTTP/1.1 200 OK
Content-Type: text/plain

success

Security Recommendations#

1.
Must verify signature: Always verify the sign parameter after receiving notifications to ensure authenticity
2.
Idempotency handling: The same chargeback may receive multiple notifications, merchants need to handle idempotency
3.
Timely response: Recommend responding within 5 seconds to avoid timeout retries
4.
Log recording: Recommend logging all received notifications and processing results for troubleshooting
Modified at 2025-09-04 08:07:03
Previous
Refund Notify WebHook API
Next
Card Notify WebHook API
Built with