---
title: Adyen
slug: extensions/mPt7aItthJinHgYCHN3D5
docTags: 
createdAt: 2025-12-14T14:23:42.173Z
---

## Overview

As outlined in the Validation overview, Forter requests information about the payment credit card being used for an order including:

- credit card expiration Month
- credit card expiration Year
- credit card bin
- credit card cvv Result/response (i.e. "M" for "Match", "X" for "no Match")
- credit card avs Result/response (i.e. "M" for "Match" or "P" for "Pass")

Note that this data does *NOT* need to be saved in your SFCC storefront but can still be passed to Forter securely via the SFCC cartridge as **Forter retains PCI-Level 1 compliance** for all incoming server requests.

## Enabling Additional Adyen Data in your Cartridge

In cases of [Adyen client side encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce) between submission and authorization, some of the above data points including credit card bin or card expiry may need to be manually enabled in your Adyen Admin panel. This can be done by logging into your Adyen admin panel and going to:
`Account` => `API URLs` => `Additional data in API response` and toggling the following fields to be enabled:

- Raw acquirer result
- Cardholder name
- Card bin
- Card summary
- Expiry date

## Mapping Credit Card auth response to the Order.ds file

Depending on your SFCC architecture (controllers, SFRA, or pipelines), you will likely need to map the authorization response on the payment instrument to the Order.ds file

```javascript
function ForterCreditCard(auth, cc) {
    var processorResponseCode = "",
        processorResponseText = "";

    // format the expiration month. from 1 to 01, etc.
    if (cc.creditCardExpirationMonth.toString().length == 1) {
        var creditCardExpMonth = "0" + cc.creditCardExpirationMonth.toString();
    } else {
        var creditCardExpMonth = cc.creditCardExpirationMonth.toString();
    }
    this.nameOnCard = cc.creditCardHolder;
    this.cardBrand = cc.creditCardType;

    if (cc.creditCardNumber.substring(0,6).indexOf('*') > -1) {
        this.bin = session.forms.billing.paymentMethods.creditCard.number.value.toString().substring(0,6);
    } else {
        this.bin = cc.creditCardNumber.toString().substring(0,6);
    }
    this.lastFourDigits = cc.creditCardNumberLastDigits;
    this.expirationMonth = card.expirationMonth.toString();
    this.expirationYear = card.expiryYear.toString();

    this.verificationResults = {};
    this.verificationResults.avsFullResult = auth.avsResultCode.toString();
    this.verificationResults.cvvResult = auth.cvcResultCode.toString();
    this.verificationResults.authorizationCode = auth.AuthorizationCode;

    this.paymentGatewayData = {};
    this.paymentGatewayData.gatewayName = "ADYEN_CREDIT"; // adjust based on your processor
    this.paymentGatewayData.gatewayTransactionId = auth.pspReference.toString(); // Adyen 16-digit psp reference value 

    processorResponseCode = auth();
    processorResponseText = auth.exact_message.toString();

    this.verificationResults.processorResponseCode = processorResponseCode;
    this.verificationResults.processorResponseText = processorResponseText; 
}
```
