Skip to main content

Get payment token​

This API to is used to get payment token.

Request Body required
  • app_id int64 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 that is used for querying (TXID of binding transaction)

  • req_date int64 required

    Current timestamp in milliseconds - GMT+7

  • 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.
    - hmacinput = app_id + | + app_trans_id + | + req_date.

    Please refer to secure data transmission for detailed information.

Responses

OK


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

    Status code detail.
    Please refer to status code for possible values.

  • sub_return_message string

    Description of status code detail.

  • data object
  • app_id int64

    Binding app_id.

  • app_trans_id string

    Binding app_trans_id.

  • binding_id string

    The id of binding has been confirmed in the Zalopay system.

  • pay_token string

    The public token is used when doing auto-debit.

  • server_time int64

    Server timestamp in seconds.

  • merchant_user_id string

    The identifier field in bind request.

  • status integer

    1: Confirmed, 3: Cancelled

  • msg_type integer

    Type of message:
    1: The user confirms an agreement.
    2: The user updates the agreement.

  • zp_user_id string

    The identifier of Zalopay user per merchant app_id.

  • masked_user_phone string

    Masked user phone (Ex: masked_user_phone: "****6938")

Loading...