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_idStringRequest ID
2request_timeDatetimeRequest time. Format: YYYY-MM-DD H:m:s
3master_merchant_codeString(50)Master merchant code provided by Baokim
4sub_merchant_codeStringSub merchant code provided by Baokim
5url_successStringRedirect URL when cancellation succeeds
6url_failStringRedirect URL when cancellation fails
7tokenStringToken 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
1codeIntegerResult code: 101 = OTP verification required
2messageStringMessage
3dataObjectReturned data

Data Information

No.ParameterData TypeRequiredDescription
1created_atDatetimeRequest time
2updated_atDatetimeUpdate time
3redirect_urlStringLink 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