Skip to main content

Cancel Auto Debit

Flow​

Description:

  • Merchant calls this API to cancel auto debit.

API Information​

Method: POST

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

Request​

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 provided by Baokim
4sub_merchant_codeString✅Sub merchant code provided by Baokim
5url_successString✅Redirect URL when cancellation succeeds
6url_failString✅Redirect URL when cancellation fails
7tokenString✅Token of card/account for auto debit

Request Example​

{
"request_id": "RQID0001",
"request_time": "2023-08-18T10:00:00.000Z",
"master_merchant_code": "BAOKIMMASTERMERCHANT",
"sub_merchant_code": "BAOKIMSUBMERCHANT",
"url_success": "https://baokim.vn/cancel/success",
"url_fail": "https://baokim.vn/cancel/fail",
"token": "Mq7AwLoHkafPdXYxvYedH8sb6MZ18k"
}

Response​

Main Parameters Table​

No.ParameterData TypeRequiredDescription
1codeInteger✅Result code: 101 = OTP verification required
2messageString✅Message
3dataObject✅Returned data

Data Information​

No.ParameterData TypeRequiredDescription
1created_atDatetime✅Request time
2updated_atDatetime✅Update time
3redirect_urlString✅Link to OTP verification page for auto debit cancellation

Response Example​

{
"code": 101,
"message": "Success",
"data": {
"created_at": "2025-04-14 15:23:10",
"updated_at": "2025-04-14 15:23:10",
"redirect_url": "https://b2b-payment-page.devtest.baokim.vn/cancel/verify?checksum=50f1c60363c29c19b1c18359f1b4cfc655165117"
}
}

Error Codes​

Error CodeDescription
104Authentication error
710Sub Merchant not found
711Master Merchant not found
712Sub Merchant inactive
713Master Merchant inactive
714Sub Merchant does not belong to Master Merchant