Notify
[!TIP|style:flat]
Notify URL is used for receiving the payment status notification.
When an order is created, YaBandPay API will deliver the status change to you each time during the payment process.
The notification of the delivered status must apply https protocol. The content of the notification is made up of signature.payment status (Note that there is a dot between the signature and the payment status JSON).
YabandPay will return asynchronous notifications from the following IP addresses, which are recommended to be added to the firewall whitelist. 8.211.41.31 8.211.10.244 8.211.8.123
1. The notification of payment
Code | State | Description |
---|---|---|
00 | paid | Payment successful |
01 | authorized | Authorization successful |
02 | pending | Payment initiated |
03 | processing | Waiting for customers to pay |
04 | verify | The customer has paid, but due to risk control reasons, we need to review it. |
05 | declined | Payment declined |
06 | failed | Payment failed |
07 | expired | Payment was not accepted within the allocated time |
08 | cancelled | Payment cancelled |
Parameter | Type | Description |
---|---|---|
sign | String | signature |
type | String | payment, refund |
user | String | the UID or email of cashier account |
amount | String | the amount submitted |
tip_amount | String | Tip included in the total amount |
currency | String | ISO 4217, For example EUR, CHF, the currency submitted |
settlement_amount | String | the settlement amount |
settlement_currency | String | EUR, the settlement currency |
exchange_rate | String | exchange rate |
amount_cny | String | payer paid amount(CNY) |
settlement_rate | String | settlement rate for payer |
order_id | String | order id from Merchant |
transaction_id | String | the transaction id from payment method provider, ie. WeChat Pay or Alipay+ |
acquirer_id | String | the transaction id from institution, Acquirer Reference Number(ARN) |
description | String | order description |
createDate | String | create date |
state | String | Processing, Paid,Cancelled, Expired, Verify,Authorized,Declined,Failed |
demo | String | custom field |
out_trade_no | String | out trade number |
sub_pay_method | String | payer payment method, ie. WeChat Pay, Alipay+ |
pay_method | String | offline, online |
paid_time | String | paid time |
yb_transaction_id | String | Unique transaction ID of YabandPay |
3ds_status | String | 3ds Status |
3ds_trxid | String | Unique transaction ID of 3ds |
3ds_version | String | 3ds version |
3DS Status:
Parameter | Type | Description |
---|---|---|
A | String | Attempts Processing Performed; Not Authenticated/Verified, but a proof of attempted authentication/verification is provided. |
C | String | Challenge Required; Additional authentication is required. |
D | String | Challenge Required; Decoupled Authentication confirmed. |
I | String | Informational Only; Merchant challenge preference acknowledged. |
N | String | Not Authenticated /Account Not Verified; Transaction denied. |
R | String | Authentication/ Account Verification Rejected; Issuer is rejecting authentication/verification and requests that authorisation not be attempted. |
U | String | Authentication/Account Verification Could Not Be Performed, Technical or other problem. |
Y | String | Authentication/Account Verification Successful. |
Example Response:
{
"sign": "4d1ebd43cf3a06d35282c84b990917e49d5cafc0a1cad62c2b695a1683ec6ba0",
"data": {
"type": "payment",
"user": "016683",
"order_id": "190510140815",
"trade_id": "8a8aa7c7-66d7-e2cc-e2a6-fff7c77aaefd",
"transaction_id": "4200000298201905227377147799",
"acquirer_id": "4200000298201905227377147799",
"yb_transaction_id": "c8823612-383f-35fc-f28d-c0eae039e870",
"amount": "1.00",
"tip_amount": "0.10",
"currency": "EUR",
"settlement_amount": "1.00",
"settlement_currency": "EUR",
"exchange_rate": "1",
"amount_cny": "0.77",
"settlement_rate": "7.779779",
"description": "yaband test",
"createDate": "1558510731",
"pay_method": "online",
"state": "paid",
"demo": "test",
"out_trade_no": "a4d7684a-e326-44c1-bea5-0601f7a9b191",
"sub_pay_method": "WeChat Pay",
"paid_time": "1603355159",
"3ds_status": "Y",
"3ds_trxid": "1d0c6eb3-6282-4cf9-9549-884410918d2d",
"3ds_version": "2.2.0"
}
}
2. The notification of refund
Parameter | Type | Description |
---|---|---|
sign | String | signature |
type | String | refund |
user | String | the UID or email of cashier account |
pay_method | String | offline, online |
sub_pay_method | String | payer payment method, ie. WeChat Pay, Alipay+ |
refund_id | String | the refund id |
m_refund_id | String | merchant-defined refund number |
transaction_id | String | the transaction id from YabBandPay |
refund_amount | String | the amount submitted |
refund_currency | String | the settlement currency |
order_id | String | the order id from Merchant |
refund_description | String | refund description |
refund_time | String | create date |
state | String | to-be-approval,refund pending,refund processing, refunded,refund error , refund failed,refund cancelled |
Notification information:
{
"sign": "b71a0b52811b98aed22b928c0ab124e39b722bca0547b5e6c5d19763bec456ae",
"data": {
"type": "refund",
"user": "016683",
"refund_id": "b20d3668-d71f-432f-8809-f84f0d9139d4",
"m_refund_id":"20240301143029616187",
"transaction_id":"cf483d9e-637c-a92d-0716-5b8199d10f8c",
"refund_amount": "1.00",
"refund_currency": "EUR",
"order_id": "200219",
"refund_description": "test",
"refund_time": "0",
"state": "refunded",
"pay_method": "online",
"sub_pay_method": "WeChat Pay",
}
}
[!TIP|style:flat]
the state is refund processing after refund request.
the state is refunded after refund requet completed.
3. Notification Frequency
The response of notification must return status-code 200, and body must return ok. If ok is not returned, then we will send the notification again.
The frequency of notifications is as follows:
Retry | Frequency |
---|---|
1 | 10s |
2 | 30s |
3 | 60s |
4 | 300s |
5 | 3600s |
... | 3600s |
15 | 3600s |
Yabandpay will not send nocification once more if ok is not returned after 15 times.
4. Asynchronous notification payment status description
Payment status:
Code | State | Description |
---|---|---|
00 | paid | Payment successful |
01 | authorized | Authorization successful |
02 | pending | Payment initiated |
03 | processing | Waiting for customers to pay |
04 | verify | The customer has paid, but due to risk control reasons, we need to review it. |
05 | declined | Payment declined |
06 | failed | Payment failed |
07 | expired | Payment was not accepted within the allocated time |
08 | cancelled | Payment cancelled |
Refund status:
Code | State | Description |
---|---|---|
20 | to-be-approval | Waiting for admin approval. |
21 | refund pending | The current balance is insufficient. It will be automatically submitted when the balance is sufficient. |
22 | refund processing | Refund has been submitted. |
23 | refunded | Refund successfully. |
24 | refund failed | Refund failed, please try again. |
25 | refund error | Please contact our staff. |
26 | refund cancelled | The refund order has been cancelled. |