Skip to main content

Query balance​

This API to query the balance of a specific user before paying.

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 ...

  • pay_token string required

    The public token of the payer.

  • req_date int64 required

    Current timestamp in milliseconds - GMT+7.

  • amount int64 required

    Payment amount.

  • 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 + | + pay_token + | + identifier + | + amount + | + 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[]
  • Array [
  • channel int64

    Payment channel.

  • payable boolean

    Check if the user has the ability to pay:
    - true: The user can payment.
    - false: The user can not payment.

  • bank_code string

    Bank code of the channel.

  • ]
  • discount_amount integer

    The discount amount of the best user's voucher for merchant's order.
    If discount_amount == 0 that means user has no voucher can apply for current order.

Loading...