Skip to main content

Create new binding for the tokenization

Create new binding for the tokenization

Request Body required

Tokenization Binding

  • app_id int64 required

    The unique ID of the application will be provided after the merchant registered successfully with Zalopay.

  • req_date int64 required

    The timestamp that order was created at in ms. The different limit is 15 minutes.

  • app_trans_id string required

    Unique transaction ID of application, format: yyMMddxxxxxxxxx. Max length is 40. For example: 180208181007242

  • identifier string required

    User's identifier on merchant system, it can be merchant user's id, phone number, email...

  • binding_type string required

    Possible values: [WALLET, CARD]

    This field specify which type of binding, currently WALLET OR CARD is allowed.

  • binding_mode string required

    Possible values: [BIND, BIND_AND_PAY]

    This field specify which mode of binding, currently BIND OR BIND_AND_PAY is allowed.

  • device_type string required

    Possible values: [MOBILE, DESKTOP]

    This field specify which device type, currently MOBILE OR DESKTOP is allowed.

  • binding_data string required

    Application's own data. Use "{}" if empty".
    JSON string include special information of binding.
    Specific binding_data's fields:
    redirect_url

    + DataType: string
    + Format: URL
    + Description: 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

    + DataType: string
    + Format: URL
    + Description: The 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

    callback_url

    + DataType: string
    + Format: URL
    + Description: Zalopay will use this URL to notify when the binding success. If not provided, the default app callback URL will be used.

    embed_data

    + DataType: string
    + Format: JSON string
    + Description: Application's own data. Use "{}" if empty".

  • payment_data string required

    Application's own data. Use "{}" if empty".
    JSON string include special information of binding.
    Specific payment_data's fields:
    amount

    + DataType: integer
    + Format: int64
    + Description: Amount of money will be charged.

    description

    + DataType: string
    + Description: Users will see this text when they are in the confirm payment screen.

    callback_url

    + DataType: string
    + Format: URL
    + Description: Zalopay will use this URL to notify when the payment success. If not provided, the default app callback URL will be used.

    embed_data

    + DataType: string
    + Format: JSON string
    + Description: Application's own data. Use "{}" if empty".

  • mac string required

    It is signature of request. It's calculated by following input: hmacinput = app_id + | + apps_trans_id + | + identifier + | + binding_mode + | + binding_type + | + device_type + | + binding_data + | + payment_data + | + req_date; and use sha256 with app's hmac key as sign key.

    Please refer to secure data transmission for detailed information.

Responses

OK


Schema
  • return_code integer

    Return codes:

    1 - SUCCESS

    2 - FAIL

    3 - PROCESSING

    -500 - SYSTEM_ERROR

    -429 - LIMIT_REQUEST_REACH

    406 - ILLEGAL_STATUS

    -405 - ILLEGAL_CLIENT_REQUEST

    -403 - ILLEGAL_SIGNATURE_REQUEST

    -402 - ILLEGAL_APP_REQUEST

    -401 - ILLEGAL_DATA_REQUEST

  • return_message string
  • sub_return_code integer
  • sub_return_message string
  • binding_token string
  • binding_url string
  • reform_url string
Loading...