Skip to main content

Pay by token​

This API is used for submitting payment after merchants created the order successfully

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.

  • identifier string required

    User's identifier on the merchant system, it can be a merchant user's id, user's name ...

  • zp_trans_token string required

    The token is generated under Zalopay system by API Create order after the order has been created successfully.

  • pay_token string required

    The public token of the payer.

  • 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 + | + identifier + | + zp_trans_token + | + pay_token + | + 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 return 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

  • app_trans_id string

    TXID of order transaction.

  • zp_trans_id integer

    Zalopay's transaction code, initiate when users confirms payment at Zalopay site.

Loading...