Callback notification

The callback notification interface (interface required)

After the user has successfully paid, we will pass the successful order information to the corresponding URL in your notify_url parameter in json format. The Notify_url is the parameter passed in when you initiated the payment.

After receiving the payment results, please return the SUCCESS string to B.app.

If the callback notification fails, it will be retried 5 times, which is 5 seconds, 10 seconds, 30 seconds, 1 minute, and 5 minutes after the first callback failure. After retrying 5 times, the notification is still unsuccessful and will not be automatically retried. You can use the query interface to determine whether the success is done.

Transfer method:POST

Parameter format::application/json

Parameters Types Description
bapp_id string(32) the bapp platform order number is unique on B.app
order_id string(32) The merchant order number is the order_id that was passed in when you initiated the order.
order_state int The current order status, there is a callback, the payment must be successful, always = 1
order_type int The user payment method,1: Scan code payment 2: H5 payment 3: APP primary payment
amount long The order amount is the same as the amount when the order was placed, which is the amount before the uncharged fee, the unit is Cent.
amount_type string(16) The currency unit of the order, currently only supports RMB, so it will only be: CNY
amount_btc long Bitcoin amount, unit (Satoshi) Note: 1BTC=100,000,000 Satoshi
order_fee long The merchant fee, unit (Cent), currency and incoming currency are the same
order_fee_btc long The merchant fee, unit (Satoshi)
rate long The Bitcoin exchange rate at the time of trading, unit (Cent/BTC)
create_time long The order creation timestamp (13 characters)
pay_time long The payment timestamp (13 characters)
body string(128) The product name, UTF8 format, consistent with the product name that you passed in
extra string(64) The additional parameters, you initiate the payment brought in parameters, returned as they are
order_ip string(45) The IP parameters, you initiate the payment brought in parameters, returned as they are
time long The server time, 13-bit timestamp, is used for security reasons to defend against request resend attacks
app_key string(16) Platform generated app key, 16-bit character
sign string(32) The signature, signature method and the initiate payment

The callback notification example

  1. {
  2. "bapp_id": "20190618171802840b6a",
  3. "order_id": "1",
  4. "order_state": 1,
  5. "order_type": 2,
  6. "amount": 1,
  7. "amount_type": "CNY",
  8. "amount_btc": 16,
  9. "order_fee": 0,
  10. "order_fee_btc": 0,
  11. "rate": 6432450,
  12. "create_time": 1560849482796,
  13. "pay_time": 1560859623468,
  14. "body": "goods_name",
  15. "extra": "",
  16. "order_ip": "",
  17. "time": 1561023663119,
  18. "app_key": "4789e57f8629eb9e",
  19. "sign": "d72e1c8d7efbac64cbc8ec5b76b00671"
  20. }