Payment-method icon

GoPay Component

Add GoPay to an existing Components integration.

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

Requirements

Select which endpoint you are using:

API reference

Select which endpoint you are using:

Component configuration

Step 1: Create a DOM element

Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:

 <div id="gopay_wallet-container"></div>

Step 2: Create an instance of the Component

v6.0.0 or later

Create an instance of the Component, passing:

  • Your instance of AdyenCheckout.
const goPay = new Redirect(checkout, { type: 'gopay_wallet' }).mount('#gopay_wallet-container');

Use the create method of your AdyenCheckout instance, in this case checkout, to create the Component:

const goPayComponent = checkout.create('gopay_wallet').mount('#gopay_wallet-container');

Recurring

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

The /payments response contains:
resultCode: Use this to show your shopper the payment result.

When the payment is processed, you receive the final status of the payment in a webhook containing:

  • eventCode: AUTHORISATION
  • success: true

Make a recurring CardOnFile payment with a token

Recurring CardOnFile payments with GoPay go through a challenge flow to reduce the likelihood of fraudulent transactions. You must redirect the shopper to GoPay so they can enter their PIN.
To make a recurring CardOnFile 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: CardOnFile

The /payments response contains:

resultCode: RedirectShopper
action: Contains the url to redirect the shopper to.

When the shopper is redirected back to your page, call /payments/details with the redirectResult to complete the flow and get the status of the payment.

When the payment is processed, you receive a webhook containing the final status of the payment:

  • eventCode: AUTHORISATION
  • success: true

Test and go live

When you want to test GoPay, contact our Support Team.

Refer to GoPay's knowledge base for more information about testing GoPay payments.

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

See also