# Adyen V2

<div data-full-width="false"><figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2F0i8TRi0st5nzTo4mnLMo%2Fimage.png?alt=media&#x26;token=5118a7cb-6c34-4ffb-8bd2-1d601101e4de" alt="" width="563"><figcaption></figcaption></figure></div>

{% 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.checkoutchamp.com/crm/gateway-setup/gateway-integrations/adyen-v2/adyen-alternate-payments)

* Afterpay
* Alipay
* Blik
* Bancontact
* iDEAL
* Kakao Pay
* Klarna
* MobilePay
* MB WAY
* NaverPay
* PayByBank
* PayCo
* PayPay
* Pix
* Riverty
* SEPA
* Swish
* Trustly
* Vipps
* WechatPay
* Google Pay
* Apple Pay
  {% endhint %}

**STEP 1**

**ADYEN ACCOUNT**

{% hint style="info" %}
Additional information may be found at

<https://docs.adyen.com/>[\
https://help.adyen.com/en\_US/knowledge](https://help.adyen.com/en_US/knowledge)

Contact Adyen directly at <Support@adyen.com>
{% endhint %}

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.checkoutchamp.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.checkoutchamp.com/crm/gateway-setup/gateway-integrations/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://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FR3xQ2PV5f5ewBsgzkKzt%2Fimage.png?alt=media&#x26;token=621ad52e-b03c-4a46-8daa-0accf5ae5b5a" alt="" width="563"><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://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FZU0VVs1s8HomKKw6ejcA%2Fimage.png?alt=media&#x26;token=734286e8-4476-4df7-a394-20ed9a4bb2db" alt="" width="375"><figcaption></figcaption></figure>

***

{% hint style="info" %}
The following steps are for pages hosted outside of Checkout Champ
{% endhint %}

**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 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>
```

**STEP 6**

For 3DS and alternate payments, your checkout page must support the standard 3DS workflow

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

**STEP 7**

Extra Risk Management

Checkout Champ supports a device fingerprint passed from the page.  Follow these instructions from Adyen.  Pass the generated fingerprint to [Import Order API](https://apidocs.checkoutchamp.com/#275a54c6-b4b0-414c-819b-7387e9a81f58) as **fraudSessionId**.

If using Checkout Champ hosted pages, set the id of the hidden field to **fraudSessionId** and it will be automatically passed at checkout.

{% embed url="<https://docs.adyen.com/risk-management/device-fingerprinting>" %}
