Payment-method icon

GoPay Redirect Component

Add GoPay to an existing iOS Components integration.

This page explains how to add GoPay to your existing iOS Components integration.

Requirements

Select the server-side flow that your integration uses:

API reference

Select which endpoint you are using:

Component configuration

v5.0.0 or later

If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the GoPay Component:

v4.x.x

If your integration uses an earlier version of iOS Components:

There are no configuration steps specific to GoPay required for Components.

Recurring payments

GoPay supports recurring payments. The first time your shopper makes a payment, you need to create a token, which you can use later to make Subscription or CardOnFile payments. Note that the flows for Subscription and CardOnFile payments are different.

Create a token

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

When the payment has been settled, you receive a webhook containing:

  • eventCode: RECURRING_CONTRACT
  • originalReference: The pspReference of the initial payment.
  • pspReference: This is the token that you need to make recurring payments for this shopper.

Make sure that your server is able to receive RECURRING_CONTRACT as part of your standard webhooks. You can enable the RECURRING_CONTRACT event code in the webhook settings page.

Make a Subscription payment with a token

To make a recurring Subscription payment with a token, make a /payments request and include:

  • paymentMethod.storedPaymentMethodId: The shopper's payment token.

    You can also get this value using the /listRecurringDetails endpoint.

  • shopperReference: Your unique identifier for the shopper.

  • shopperInteraction: ContAuth

  • recurringProcessingModel: Subscription