Payment-method icon

Zip Redirect Component

Add Zip to an existing Components integration.

If you are using Android Components v5.0.0 or later:

This payment method requires no additional configuration.

Follow the Components integration guide and use the following module and Component names:

If you have an existing Android Components integration, you can use our Redirect Component to redirect the shopper to the Zip's website where they can complete the payment.

When making a Zip payment, you also need to:

  1. Collect shopper details, and specify these in your payment request. Zip uses these for risk checks.
  2. Provide information about the purchased items in your payment request.
  3. Include Zip in the list of available payment methods.
  4. Handle the redirect.

Requirements

Requirement Description
Integration type Make sure that you have built an Advanced flow Android Components integration.
Setup steps Before you begin, add Zip in your Customer Area.

Show Zip in your payment form

Include Zip in the list of available payment methods. Specify in your /paymentMethods request:

The response contains paymentMethod.type: zip.

We provide logos for Zip which you can use on your payment form. For more information, refer to Downloading logos.

Make a payment

When the shopper proceeds to pay, you need to:

  1. From your server, make a /payments request, specifying:

    • paymentMethod.type: Set this to zip.
    • returnUrl: The URL where the shopper is taken back to in case of a redirection. Get this URL from the Component in the RedirectComponent.getReturnUrl(context).

    Select which endpoint you are using:

In the /payments response, check the action object for the information that you must use to redirect the shopper.

  1. Pass the action object to your client app.

Handle the redirect

  1. Use the Redirect Component to redirect the shopper to Zip.
  2. After the shopper returns to your app, make a POST /payments/details request from your server, providing:
    • details: The actionComponentData.details object from the Redirect Component.

You receive a response containing:

  • resultCode: Use this to present the payment result to your shopper.
  • pspReference: Our unique identifier for the transaction.

Present the payment result

Use the resultCode that you received in the /payments/details response to present the payment result to your shopper.

The resultCode values you can receive for Zip are:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment has been successful.
Cancelled The shopper cancelled the payment while on Zip's website. Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.
Error There was an error when the payment was being processed. Inform the shopper that there was an error processing their payment. The response contains a refusalReason, indicating the cause of the error.
Pending or
Received
The shopper has completed the payment but the final result is not yet known. Inform the shopper that you have received their order, and are waiting for the payment to be completed.
To know the final result of the payment, wait for the AUTHORISATION webhook.
Refused The payment was refused by Zip. Ask the shopper to try the payment again using a different payment method.

If the shopper closed the browser and failed to return to your website or app, wait for webhooks to know the outcome of the payment. The webhooks you can receive for Zip are:

eventCode success field Description Action to take
AUTHORISATION false The transaction failed. Cancel the order and inform the shopper that the payment failed.
AUTHORISATION true The shopper successfully completed the payment. Inform the shopper that the payment has been successful and proceed with the order.
OFFER_CLOSED true The shopper did not complete the payment. Cancel the order and inform the shopper that the payment timed out.

Recurring payments

We support recurring transactions for Zip. To make recurring payments, you need to:

  1. Create a shopper token.
  2. Use the token to make future payments for the shopper.

Create a token

To create a token, include in your /payments request:

  • storePaymentMethod: true
  • shopperReference: Your unique identifier for the shopper.

When the payment has been settled, you receive a recurring.token.created webhook containing:

  • type: recurring.token.created
  • shopperReference: Your unique identifier for the shopper.
  • eventId: The pspReference of the initial payment.
  • storedPaymentMethodId: The token that you need to make recurring payments for this shopper.

Make sure that your server is able to receive the Recurring tokens life cycle events webhook. You can set up this webhook in your Customer Area.

Make a payment with a token

To make a payment with the token, include in your /payments request:

  • paymentMethod.storedPaymentMethodId: The storedPaymentMethodId from the recurring.token.created webhook.
    You can also get this value using the /listRecurringDetails endpoint.
  • shopperReference: The unique shopper identifier that you specified when creating the token.
  • shopperInteraction: ContAuth.
  • recurringProcessingModel: Subscription or UnscheduledCardOnFile.

For more information about the shopperInteraction and recurringProcessingModel fields, refer to Tokenization.

Test and go live

Create Zip test accounts using the credentials on Zip's test credentials page. You can then use your test account to make a payment in the test environment.

Check the status of Zip test payments in your Customer Area > Transactions > Payments.

Before you can accept live Zip payments, you need to submit a request for Zip in your live Customer Area.

See also