Create binding
This API to is used to create binding.
- application/json
- application/x-www-form-urlencoded
Request Body required
- app_id int32 required
This is a Zalopay-provided identifier specific to the merchant's service or application, established during the integration agreement for payment methods.
- app_trans_id string(40) required
The transaction id is used to initialize a binding request, generated by merchant system, unique transaction ID of application (TXID of binding transaction), format: yyMMddxxxxxxxxx.
- req_date int64 required
Current timestamp in milliseconds - GMT+7.
- max_amount int64 required
Maximum permissible amount. The default is real balance. Default is 0 if not provided.
- redirect_url string(256)
URL of merchant binding page(web), be used in the desktop binding scenario. After the binding process finished, Zalopay auto-debit binding page will redirect to merchant binding page via redirect URL with the binding result.
- redirect_deep_link string(256)
Deep-link of merchant app, be used in the mobile binding scenario. After the binding process finished, Zalopay app will open the merchant app via redirect deep link with the binding result.
- binding_data string required
This field contains detail binding information for billing purposes. Use "" when empty.
- binding_type string
Possible values: [
WALLET]This field specify which type of binding, currently only WALLET is allowed. Default is WALLET if not provided
- callback_url string(256)
After the binding process finished successfully, Zalopay auto-debit system will notify to merchant system via this URL.
- identifier string(128) required
User's identifier on the merchant system, it can be the merchant user's id, user's name...
- mac string required
Authentication information mac = HMAC(hmac_algorihtm, mac key, hmacinput), see as below:
- hmac_algorihtm: is a security method registered by Merchant with Zalopay, the default is HmacSHA256.
- mac key: provided by Zalopay at registration.
- hmac_input = app_id +|+ apps_trans_id +|+ binding_data +|+ binding_type +|+ identifier +|+ max_amount +|+ req_date.Please refer to secure data transmission for detailed information.
Request Body required
- app_id int32 required
This is a Zalopay-provided identifier specific to the merchant's service or application, established during the integration agreement for payment methods.
- app_trans_id string(40) required
The transaction id is used to initialize a binding request, generated by merchant system, unique transaction ID of application (TXID of binding transaction), format: yyMMddxxxxxxxxx.
- req_date int64 required
Current timestamp in milliseconds - GMT+7.
- max_amount int64 required
Maximum permissible amount. The default is real balance. Default is 0 if not provided.
- redirect_url string(256)
URL of merchant binding page(web), be used in the desktop binding scenario. After the binding process finished, Zalopay auto-debit binding page will redirect to merchant binding page via redirect URL with the binding result.
- redirect_deep_link string(256)
Deep-link of merchant app, be used in the mobile binding scenario. After the binding process finished, Zalopay app will open the merchant app via redirect deep link with the binding result.
- binding_data string required
This field contains detail binding information for billing purposes. Use "" when empty.
- binding_type string
Possible values: [
WALLET]This field specify which type of binding, currently only WALLET is allowed. Default is WALLET if not provided
- callback_url string(256)
After the binding process finished successfully, Zalopay auto-debit system will notify to merchant system via this URL.
- identifier string(128) required
User's identifier on the merchant system, it can be the merchant user's id, user's name...
- mac string required
Authentication information mac = HMAC(hmac_algorihtm, mac key, hmacinput), see as below:
- hmac_algorihtm: is a security method registered by Merchant with Zalopay, the default is HmacSHA256.
- mac key: provided by Zalopay at registration.
- hmac_input = app_id +|+ apps_trans_id +|+ binding_data +|+ binding_type +|+ identifier +|+ max_amount +|+ req_date.Please refer to secure data transmission for detailed information.
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema
- return_code integer
Status code.
Please refer to status code for possible values. - return_message string
Description of status code.
- sub_return_code integer
Staus code detail.
Please refer to sub status code for possible values. - sub_return_message string
Description of status code detail.
- binding_token string
The token for confirming.
- binding_qr_link string
The URL for the user confirming the agreement in the web scenario. Zalopay has generated QR code for Merchant.
- deep_link string
The deep-link for confirming the agreement in the mobile scenario.
- short_link string
The URL for the user agreement in the web scenario. Merchant need gen QR from this link.
{
"return_code": 0,
"return_message": "string",
"sub_return_code": 0,
"sub_return_message": "string",
"binding_token": "string",
"binding_qr_link": "string",
"deep_link": "string",
"short_link": "string"
}