Skip to main content

Auto Debit Cancellation Webhook

Process​

Description:

  • After receiving the auto debit cancellation result from the Partner Bank, Baokim will send a webhook to the merchant.

API Information​

Method: POST

URL: /b2b/core/api/ext/mm/order/cancel

Request Header:

HeaderDescription
SignatureDigital signature to verify data integrity

Request​

Request Parameters​

(Baokim sends to merchant)

Main Parameters Table​

No.ParameterData TypeRequiredDescription
1request_idString✅Request ID
2request_timeDatetime✅Request time. Format: YYYY-MM-DD H:m:s
3master_merchant_codeString(50)✅Master merchant code
4sub_merchant_codeString(50)✅Sub merchant code
5result_codeInteger✅Auto debit cancellation status
6result_messageString✅Message
7token_infoObject❌Token information after cancellation

Token Information (token_info)​

No.ParameterData TypeRequiredDescription
1tokenString✅Card token string saved on Baokim
2statusInteger✅Token status: 1 = Active, 0 = Deactive

Request Example​

{
"request_id": "1e3fe73d3054904a9a4bb",
"request_time": "2023-08-18 10:00:00",
"master_merchant_code": "BAOKIMMASTERMERCHANT",
"sub_merchant_code": "BAOKIMSUBMERCHANT",
"result_code": 200,
"result_message": "Success",
"token_info": {
"token": "Mq7AwLoHkafPdXYxvYedH8sb6MZ18k",
"status": 0
}
}

Response​

(Merchant responds to Baokim)

Main Parameters Table​

No.ParameterData TypeRequiredDescription
1codeInteger✅Result code. 0 = Merchant processed webhook successfully
2messageString✅Processing result message
3dataObject❌Returned data (if any)

Response Example​

{
"code": 200,
"message": "Successfully",
"data": null
}