Skip to main content

Topup for a user

Topup for a user

Request Body required

Topup for a user

  • app_id int64 required

    The unique ID of the partner will be provided after the partner registered successfully with Zalopay

  • payment_id string required

    The unique ID of the partner will be provided after the partner registered successfully with Zalopay

  • partner_order_id string required

    The unique id, generate in partner system. Using for reconcile

  • m_u_id string required

    The user's identity in the response of QueryUser API

  • amount int64 required

    The amount top-up to receiver’s wallet

  • description string required

    Extend information

  • partner_embed_data string required

    Partner's specify info, a json string.

    Example: “{\“store_id\”:\“s2\”,\“store_name\”:\ “name\”}

  • reference_id string

    Zalopay reference id response in query user response

  • extra_info string required

    Using for extend purpose, a json string

  • time int64 required

    Requests timestamp in ms

  • sig string required

    It’s calculated by following input: hmacinput = (app_id + “|” + payment_id + “|” + partner_order_id + “|” + m_u_id + “|” + amount + “|” + description + “|” + partner_embed_data + “|” + extra_info + “|” + time) and use sha256 with app’s hmac key then RSA with app’s private key Zalopay provide.

    Please refer to secure data transmission for detailed information.

Responses

OK


Schema
  • return_code integer

    1 - SUCCESS

    2 - FAIL

  • return_message string

    Return code description

  • sub_return_code integer

    -68 - Duplicate resource

    -101 - User wallet account not exists

    -401 - Request param illegal

    -402 - Unauthorized

    -406 - User wallet reaches a fund-in limitation

    -500 - Zalopay system error

    -503 - The system is maintenance

  • sub_return_message string

    Sub return code description

  • data object
  • order_id string

    Merchant transaction code

  • status integer

    1 – SUCCESS

    2 – FAIL

    3 – PROCESSING: Has to repeat query order status in a period of time until final status (configured interval and number of query)

    4 – PENDING: Pending transactions, needs to be manually fixed by internal teams

  • m_u_id string

    User's identity

  • phone string

    User’s phone

  • amount int64

    Transaction amount

  • description string

    Transaction description

  • partner_fee int64

    Partner fee

  • zlp_fee int64

    Zalopay fee

  • extra_info string

    Order extra info, json string

  • time int64

    Transaction timestamp in millisecond

  • upgrade_url string

    Zalopay middle_page url to upgrade for users with fund-in limit

    Displayed when receiving return_code = 2 and sub_return_code = -406.

Loading...