Developer Documentation
Developer Documentation
Home
Zip

Embedded Checkout

An embedded checkout allows the Zip checkout to be hosted within an iframe on the merchant’s web site, rather than being redirected to Zip. This is a similar concept to the lightbox checkout.

Use

  1. Create an order via POST Create Order endpoint
  2. The response returns a token to be used with the checkout process
  3. Append &embedded=true to the redirectUrl property and set the src attribute of the iframe to the URL

Example iframe element:

<iframe src="https://checkout.partpay.co.uk?token=ae59b28b-81dc-40de-b51a-e915ed87b381&embedded=true" style="width:600px;height:700px"></iframe>
Detecting Checkout End

You have two options to detect the end of the Zip checkout process

  1. Listen for changes to the src attribute to detect when the checkout process has been completed (and src is set to the returnUrl that you passed in the create order stage); or
  2. The child iFrame will post a message to the parent indicating success or failure via the following messages: partpay-checkout-order-success or partpay-checkout-close-window