The Zip UK merchant API allows for Zip orders to be created and paid for online - typical use for this is e-commerce.
To access this API you will need to obtain a token using the Client Credentials flow - see more in Authentication
Each of these steps is described in more detail below:
- User selects Zip UK This is typically offered as a payment option for users when they are at the stage of checkout on the merchant site.
- Merchant Server POSTs to Zip UK API The merchant server creates an API call to the Zip UK Create Order endpoint. This contains:
- Customer details (email, name, phone number)
- Order details (what the customer is purchasing from the merchant site)
- Billing and Shipping addresses
- Amount (plus optional information regarding discounts / shipping / tax)
- RedirectUrl - this is a merchant hosted URL, to return the customer to once they have completed the Zip checkout process.
- Zip UK API returns a token and a Redirect URL The Zip UK API returns a unique token for the order and the URL to redirect the user to.
- Redirect User to Zip UK payment page Redirect the user to the URL returned in step 3 from the API
- User Completes Payment Steps at Zip UK User completes their payment information on Zip UK site. This will result in a user being able to pay via Zip UK or not.
- User is returned to the Merchant page when complete Once user has completed the Zip UK process, they are redirected to the Merchant page. When the user is returned back to the merchant page, the URL will have the following parameters appended to the URL:
paymentStatusindicates the status of the payment. Possible values are:
success: Payment via Zip UK completed.
failure: Payment not taken - Zip UK service not offered, or payment declined.
cancelled: User cancelled out of Zip UK process and returned to merchant site.
orderIdused to uniquely identify the order
- Merchant Server queries Zip UK API for order information. This is done via the Get Order endpoint, and this can be used to reconcile any orders that have started, but users have not returned to the merchant site, for whatever reason.
- Merchant site reconciles payment On receipt of a payment status (successful or otherwise), it is expected the merchant server will reconcile the order status.