Create a Refund

Plugin icon

In-Store API

Give your shoppers the option to pay with Zip in-store with our point-of-sale API.

To process a refund you will need to make a request to the /refund endpoint. This request is made using the 'receipt_number' returned by Zip in your /purchaserequests API call.

The request endpoint will include the id returned in the original POST /purchaserequests call to identify the order for which we are refunding. An example of this is as below:

https://merchantapi.sandbox.zipmoney.com.au/v1/purchaserequests/XXXXXXX/refund

This API call will contain:

  • A unique refund reference
  • Amount
  • Store location information

The Zip API success response will contain no body.

This /refunds API call should be made from your server and not directly from the client front end. Generally this is triggered from your order management system.

921

Amount and order reference

The total amount to be paid via Zip should be passed in your request as the 'payAmount'. This value will be deducted from the customers available funds.

Your transaction reference for the payment should be passed as 'refCode' . This should be the reference that you would like to appear on your Zip Disbursement Report.

An example of passing these is below:

{
    "refundAmount": 280,
    "refCode": "your_transaction_reference"
}

Store location information

Each order must identify:

  • The transacting store
  • The staff reference
  • The device reference

The store 'Location ID' is a value provided by the Zip team for each store location.

The staff and device references are your own references for each and need not be communicated to Zip. These will simply be used to assist in troubleshooting any issues in the order logs:

This can be passed as below:

"originator": {
     "staffActor": {
          "refCode": "your_staff_member_reference",
          "name": "your_staff_member_name"
      },
      "locationId": "XXXXX",
      "deviceRefCode": "your_device_reference"
}

The full request

An example payload can be found below:

{
    "refundAmount": 280,
    "refCode": "your_transaction_reference",
    "originator": {
         "staffActor": {
             "refCode": "your_staff_member_reference",
             "name": "your_staff_member_name"
          },
          "locationId": "XXXXX",
          "deviceRefCode": "your_device_reference"
    }
}