Skip to main content

Hybrid payment

Hybrid payment

Request Body required

Hybrid Payment

  • app_id int64 required

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

  • identifier string required

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

  • pay_token string required

    The public token of the payer.

  • app_user string required

    The merchant ID.

  • app_trans_id string required

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

  • app_time int64 required

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

  • amount int64 required

    Amount of money will be charged.

  • description string required

    Users will see this text when they are in the confirm payment screen.

  • item string required

    JSON string describes order items.

  • embed_data string required

    Application's own data. Use "{}" if empty".
    JSON string include special information of order.
    Specific embed_data's fields:
    preferred_payment_method

    + DataType: array string
    + Format: ["domestic_card", "vietqr", "..."]. Refer to here
    + Description: Used to display optional payment methods on the Zalopay portal, example: {"preferred_payment_method":["vietqr"]}

    redirecturl

    + DataType: string
    + Format: URL
    + Description: Redirect to this url after successful / failure payment via Zalopay Gateway (This will override the merchant's redirect url registered with Zalopay). Example: {"redirecturl": "https://docs.Zalopay.vn/result"}

    columninfo

    + DataType: json string
    + Format: {"column_name": "value"}
    + Description: Add information into the section Management of transaction details on Merchant site, If the column does not yet exist, please go to the Display data configuration setting to configure. Example: {"columninfo": "{\"branch_id\": \"HCM\",\"store_id\": \"CH123\",\"store_name\": \"Saigon Centre\",\"mc_campaign_id\": \"FREESHIP\"}"}

    promotioninfo

    + DataType: json string
    + Format: {"campaigncode":"code"}
    + Description: Use to launch promotions campaign. Example: {"promotioninfo": "{\"campaigncode\":\"blackfriday\"}"}

    zlppaymentid

    + DataType: string
    + Description: Payment information. Only needed when you need to receive money for different accounts. Zalopay system will generate a Payment code (corresponding to each partner bank account provided) and send it back to the partner to set up. Example: {"zlppaymentid": "P4201372"}

  • mac string required

    It is signature of request. It's calculated by following input: hmacinput = app_id + | + identifier + | + zp_trans_token + | + pay_token + | + 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

    1: Success, 2: Failed, 3: Processing

  • return_message string

    Description of return code

  • sub_return_code integer

    Detail error code

  • sub_return_message string

    Detail error message

  • app_trans_id string

    TXID of order transaction

  • zp_trans_id integer

    The Zalopay's transaction code

  • solution_url string

    The URL to redirect user to Zalopay payment page

Loading...