POST

/purchaserequests/{Id}/cancel

https://[api-endpoint-environment]/purchaserequests/{Id}/cancel

A purchase request signifies a new transaction via zip. Based on the URL used this could be a pending transaction that requires confirmation from a customer, or an immediately approved/declined transaction. Calling this endpoint will create a new purchase request and return the state of this newly created purchaseRequest to the caller.

Authorise and Capture Flow

A purchase request can be specified as 'Authorise Only', meaning that the funds are locked against the customer account, but not charged until the merchant captures the payment manually via the Zip Dashboard.

To Authorise only upon the initial transaction, you will need to include the 'Capture' field in the purchase request, specifying capture as false.

capture:falsecapture will be true by default if not specified.
{
  "refCode": "ORDERREF-3",
  "originator": {
    "locationId": "1111",
    "deviceRefCode": "DEVICEREF-1",
    "staffActor": {
      "refCode": "1",
      "name": "STAFFNO-1"
    }
  }
}
Request parameters
  • originator JSON Object REQUIRED

    Shopper information object

    • originator.locationId REQUIRED INTEGER

      Store location ID supplied by Zip.

    • originator.deviceRefCode REQUIRED STRING

      ID of the device where the transaction is taking place. Pass "null" if not available

    • originator.staffActor JSON Object

      ID of the staff who is procesing the trsnsaction. Pass "null" if not available.

      • originator.staffActor.refCode REQUIRED STRING

        ID of the staff who is procesing the trsnsaction. Pass "null" if not available.

      • originator.staffActor.name REQUIRED STRING

        Name of the staff who is procesing the trsnsaction. Pass "null" if not available.

  • refCode REQUIRED STRING

    Transaction reference ID.