GET /checkouts

GET /checkouts

This endpoint can be used to poll for change to the /checkouts request status while awaiting for the "completed" response. The state can transition to one of the following statuses based on user/system actions:

new: Awaiting the user to initiate the transaction, in a QR transaction, this awaits for the QR code to be scanned
pending: Awaiting for Zip to complete the transaction, in a QR transaction, the payment is being processed
completed: The customer's funds have been captured
cancel_requested: The merchant has decided to request for cancellation
cancelled: Zip has cancelled the transaction, typically preempted by cancel_requested
expired: The purchase request has expired and can no longer be used

In the event that the state updates to completed a charge object will be present in the payload as seen below:

{
  "id": "3f88a85d-05aa-4e82-8a74-1c02129ef543",
  "media": {
    "include_qr_code": true,
    "qr_code": "https://d.zip.co/checkouts/qr/24EjTCFn4OnRQ3cZgh1xbr"
  },
  "status": "completed",
  "charge": {
    "charge_id": "ch_ngBeF4wDKqwth3QBqHExK1",
    "receipt_number": "ee2929b5-648b-489d-9d10-426577a37440",
    "status": "captured",
    "amount": "0.01",
    "currency": "AUD",
    "_links": {}
  },
  "originator": {
    "location_id": "test-location-id",
    "device_ref_code": "test-device",
    "staff_actor": {
      "ref_code": "test-ref-code",
      "name": "test-staff-actor"
    }
  },
  "metadata": {},
  "reference": "ee2929b5-648b-489d-9d10-426577a37440",
  "type": "standard",
  "order": {
    "balance": "0.00",
    "amount": "0.01",
    "currency": "AUD",
    "created": 0,
    "items": [],
    "metadata": {}
  },
  "config": {
    "capture": true
  },
  "_links": {
    "checkout": {
      "href": "https://api.dev.au.edge.zip.co/checkouts/3f88a85d-05aa-4e82-8a74-1c02129ef543"
    }
  }
}

Charge

The charge object states the outcome of the payment.

StatusDescription
authorised User has completed payment, and Transaction amount has been authorised
captured User has completed payment, and Transaction amount has been captured
cancelled Transaction has been voided
refunded Transaction has been refunded
declined Transaction has been declined, this status does not return a charge ID