Skip to main content

Refund for a transaction

API allows to refund all or a part of the transaction's amount that has been successfully paid via Zalopay.

Request Body required
  • app_id integer required

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

  • m_refund_id string required

    Refund ID will be generated by the application. Format: yymmdd_appid_xxxxxxxxxx.

  • zp_trans_id string required

    Zalopay transaction ID for refunding.

  • amount int64 required

    Amount of money for refunding.

  • refund_fee_amount int64

    The fee of the refund transaction, which will be deducted from the amount that the buyer receives back from the refund transaction. Can be safely omitted in the request if you do not need this feature.

  • timestamp int64 required

    The timestamp that refund order was created at in ms

  • description string required

    Reason for refunding.

  • mac string required

    The signature of refund request. If refund_fee_amount is not specified, follow this template to create HMAC input:

    hmacinput = appid + | + zptransid + | + amount + | + description + | + timestamp

    Otherwise, create HMAC input by this template:

    hmacinput = appid + | + zptransid + | + amount + | + refund_fee_amount + | description + | + timestamp

    Please refer to secure data transmission for detailed information.

Responses

OK


Schema
  • return_code integer

    Status code of this operation. Please refer to status code for possible values

  • return_message string
  • sub_return_code integer

    The detailed reason explains if the operation has failed. Please refer to sub status code for possible values

  • sub_return_message string
  • refund_id int64
Loading...