If the notifyUrl parameter is provided during card application, the system will send asynchronous notifications to that address when card status changes occur. V2 notification body is RSA+AES encrypted.
Notification Types#
The system supports the following three types of card notifications:1.
Card Application Notification - Card application status change notification
2.
Card Status Change Notification - Card status change notification
3.
Card Transaction Notification - Card transaction result notification
What You Receive#
POST your notifyUrl
Content-Type: application/json
{
"encryptedData": "SFOs0qSAGLs6kHLf...",
"encryptedKey": "Vfn2M+u4uG7nWklk...",
"signType": "RSA256"
}
Step 1: Decrypt#
// 1. RSA decrypt encryptedKey with OnlinePay Public Key → get AES key
// 2. AES decrypt encryptedData with AES key → get plaintext JSON below
Step 2: Decrypted Fields#
Common Parameters#
All notifications include the following common parameters:| Parameter | Type | Required | Description |
|---|
| notifyId | string | Yes | Notification unique ID |
| merApplyNo | string | Yes | Merchant application flow number |
| applyOrderNo | string | Yes | Application order flow number |
| cardNo | string | Yes | Card number (masked) |
| notifyType | string | Yes | Notification type: card_apply, card_status_change, card_transaction |
| timestamp | string | Yes | Notification timestamp (milliseconds) |
| signType | string | Yes | MD5 or RSA256 |
| sign | string | Yes | Signature value |
1. Card Application Notification#
When the card application status changes, the system sends a card application notification.| Parameter | Type | Required | Description |
|---|
| status | string | Yes | Application status code |
| statusDesc | string | Yes | Status description |
Application Status Codes#
| Status Code | Description |
|---|
| 0 | Under Review |
| 1 | Review Failed |
| 2 | Processing |
| 3 | Processing Failed |
| 4 | Processing Successful |
| 5 | Closed |
Example#
{
"notifyId": "NF123456",
"merApplyNo": "MER202312010001",
"applyOrderNo": "APP202312010001",
"cardNo": "411111****1111",
"status": "4",
"statusDesc": "Processing Successful",
"notifyType": "card_apply",
"timestamp": "1701234567890",
"signType": "RSA256",
"sign": "a3f8e2d1..."
}
2. Card Status Change Notification#
When the card status changes, the system sends a card status change notification.| Parameter | Type | Required | Description |
|---|
| oldStatus | string | Yes | Previous status code |
| newStatus | string | Yes | New status code |
| statusDesc | string | Yes | New status description |
Card Status Codes#
| Status Code | Description |
|---|
| 0 | Pending Activation |
| 1 | Activated |
| 2 | Frozen |
| 3 | Freezing in Progress |
| 4 | Cancelling in Progress |
| 5 | Cancelled |
| 6 | Unfreezing in Progress |
| 7 | Uncancelling in Progress |
Example#
{
"notifyId": "NF123456",
"merApplyNo": "MER202312010001",
"applyOrderNo": "APP202312010001",
"cardNo": "411111****1111",
"oldStatus": "1",
"newStatus": "2",
"statusDesc": "Frozen",
"notifyType": "card_status_change",
"timestamp": "1701234567890",
"signType": "RSA256",
"sign": "b4c5d6e7..."
}
3. Card Transaction Notification#
When a card transaction is completed, the system sends a card transaction notification.| Parameter | Type | Required | Description |
|---|
| merOrderNo | string | Yes | Merchant order number |
| tradeNo | string | Yes | OnlinePay trade number |
| trxType | string | Yes | Transaction type |
| settleAmount | string | Yes | Settlement amount |
| settleCurrency | string | Yes | Settlement currency |
| amount | string | Yes | Transfer amount |
| currency | string | Yes | Transfer currency |
| status | string | Yes | Transfer status: 0=Success, 1=Failed, 2=Pending |
| transactionDirection | string | Yes | Transfer direction: 0=IN, 1=OUT |
Transaction Types#
| Type | Description |
|---|
| 0 | Deposit |
| 1 | Payment |
| 2 | Withdrawal |
| 3 | Refund |
| 4 | Payment Cancel |
| 5 | Pre-Authorization |
Example#
{
"notifyId": "NF123456",
"merOrderNo": "MER123456789",
"tradeNo": "TRADE987654321",
"cardNo": "411111****1111",
"trxType": "1",
"settleAmount": "100.00",
"settleCurrency": "USD",
"amount": "100.00",
"currency": "USD",
"status": "0",
"transactionDirection": "0",
"notifyType": "card_transaction",
"timestamp": "1625097600000",
"signType": "RSA256",
"sign": "c6d7e8f9..."
}
Step 3: Verify Signature#
1.
Sort all fields by key (exclude sign, signType, skip null/empty)
2.
Join as key1=value1&key2=value2
3.
MD5: MD5(signString + md5Key).toUpperCase() == sign
RSA256: RSA-SHA256-Verify(signString, sign, OnlinePay_PublicKey)
Step 4: Respond#
The merchant should return SUCCESS or 200 to acknowledge receipt of the notification.HTTP/1.1 200 OK
Content-Type: text/plain
success
Retry Mechanism#
Retry intervals: 0, 1, 5, 15, 30 minutes
Retry conditions: Network errors, timeout, or non-success responses