# Adyen V2

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FW6SJAzfumvzSZN0oU7Va%2FUntitled.png?alt=media&#x26;token=8c051adf-841a-4115-8ad1-de33110bd788" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
This integration uses Adyen's Checkout API v71
{% endhint %}

{% hint style="info" %}
Adyen supports credit cards and the following [alternate payment methods](https://help.konnektive.com/konnektive-crm/gateway-setup/gateways/adyen-v2/adyen-alternate-payments)

* Afterpay
* Bancontact
* iDEAL
* Kakao Pay
* Klarna
* MobilePay
* PayByBank
* Riverty
* SEPA
* Swish
* Trustly
* Google Pay
* Apple Pay
  {% endhint %}

**STEP 1**

**ADYEN ACCOUNT**

1. Obtain **merchantAccount** and **apiKey** from Adyen
2. Obtain **liveUrlPrefix** from Adyen. **liveUrlPrefix** is a string composed of a hex-encoded random part and your company name. Get the prefix from your [live Customer Area](https://ca-live.adyen.com/) under Developers > API URLs > Prefix.
3. Enable the “API PCI Payments” role for the API key (Contact the Adyen support to enable this feature). This may require submitting the Konnektive PCI documentation. Please contact your account manager if this is needed.
4. Under Account Settings set your account to “immediate” capture delay.
5. In your Customer Area, go to Developers > Additional data.
   1. Enable the following settings
      1. Acquirer result
      2. Raw acquirer result
      3. Recurring details
      4. Network transaction reference
      5. 3D Secure (optional)
6. Setup a standard webhook. This is required for final resolution of refund and capture requests.
   1. **Server configuration**
      1. URL: <https://api.konnektive.com/billers/adyenv2/notification/>
      2. Method: JSON
      3. Encryption protocol: TLSv1.2
   2. **Security**
      1. HMAC: Generate a new key and added to the **hmacKey** gateway field in Step 2.
   3. **Events**
      1. CAPTURE
      2. REFUND
      3. AUTHORISATION (if using [Alternate Payments](https://help.konnektive.com/konnektive-crm/gateway-setup/gateways/adyen-v2/adyen-alternate-payments))
      4. EXPIRE
      5. CANCELLATION

&#x20;

**STEP 2**

In the CRM, go to Gateways > Gateway Integrations. Find AdyenV2 and click the tile. Then click the <mark style="color:green;">**+Activate**</mark> button.

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2F284jWHV4yrG5QBePEJ1K%2FUntitled-1.png?alt=media&#x26;token=1102eab5-0d39-4713-a38a-9c3638b3aeb1" alt="" width="375"><figcaption></figcaption></figure>

**STEP 3**

Fill the fields obtained in Step 1.

Select “No” on **secure3DS** if it is for Non-3DS. Use **force3DS** to require 3DS from Adyen.

<figure><img src="https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FRpgyb0xVcVquv8LSnpS9%2FUntitled.png?alt=media&#x26;token=b1c8bb7d-5d30-472e-af84-1370bf51ae4e" alt="" width="375"><figcaption></figcaption></figure>

**STEP 4**

Add the hidden input browserData inside of the same form as the card input.

`<input type="hidden" name="browserData" value="" id="browserData">`

&#x20;

**STEP 5**

Add this script to your page before the closing body tag.

```javascript
Script to get browserData:
<script type="text/javascript">
    const navigator = window.navigator;
    const browserData = {
        acceptHeader: 'application/json',
        colorDepth: screen.colorDepth,
        javaEnabled: navigator.javaEnabled(),
        javaScriptEnabled: true,
        language: navigator.language,
        screenHeight: screen.height,
        screenWidth: screen.width,
        timeZoneOffset: (new Date()).getTimezoneOffset().toString(),
        userAgent: navigator.userAgent
    };
    document.getElementById('browserData').value = JSON.stringify(browserData);
</script>
```

&#x20;

**STEP 6**

For 3DS your checkout page must support the standard 3DS workflow

[Basic 3DS Instructions](https://help.konnektive.com/konnektive-crm/gateway-setup/basic-3ds-instructions)
