---
updatedAt: 2026-02-10T17:45:07.000Z
agentTools:
  siteIndex: https://docs.affirm.com/llms.txt
  projectIndex: https://docs.affirm.com/platforms/llms.txt
---

# Adobe Commerce (Magento) Telesales Integration

This guide describes how to add the Affirm Telesales Add-on module for Adobe Commerce (Magento).

<HTMLBlock>{`
<style>
  .dropdown-menu {
    font-family: Arial, sans-serif;
    max-width: 250px;
    margin-left: auto; /* Align to the right */
  	margin-right: 0; /* Ensure it's flush to the right */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #4A4AF4;
    overflow: hidden; /* Ensure the container grows with content */
  }

  .dropdown-item {
    margin-bottom: 10px;
  }

  .dropdown-toggle {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
  }

  .dropdown-toggle:hover {
    background: #f0f0f0;
  }

  .dropdown-content {
    display: none;
    margin-top: 5px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
  }

  .dropdown-item.open .dropdown-content {
    display: block;
  }

  .flag-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
  }

  .product-item {
    margin-bottom: 5px;
  }

  .product-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
  }
  
  .country-title {
    font-family: Arial, sans-serif;
    font-size:20px;
    text-align: center;
    font-weight: bold;
    color: #ffffff;
  } 

</style>
  <div class="dropdown-menu">
    <p class="country-title" alt="Countries where this product is available">Country Availability</p>

    <div class="dropdown-item">
      <button class="dropdown-toggle" onclick="toggleDropdown(event)" alt="Drop down menu displaying the available countries for this product">
        <b>Country List</b> ⬇️
      </button>
      <div class="dropdown-content">
        <div class="product-item">
          <img src="https://files.readme.io/a4c8b3d6596d943e2b93c82cb1d432a2edaf6998667835c2e97ef4a31d460c7e-us-circle-01.png" alt="USA" class="flag-icon">
          USA
        </div>
        <div class="product-item">
          <img src="https://files.readme.io/3ca294a1b4b8b8506c3ff32876abc6e3e33d0e65a509dab81398915094bdbc5c-61TcZ33ZrJL._AC_UY1000_.jpg" alt="Canada" class="flag-icon">
          Canada
        </div>
      </div>
    </div>

  </div>
`}</HTMLBlock>

## Overview

The Affirm Telesales add-on module allows your phone representatives and administrators to provide Affirm as a payment option when creating orders in Adobe Commerce (Magento). When they create an order using the Telesales option, Affirm sends the customer a link via email and SMS to begin their loan application process.

### Before You Begin

Before adding the module, [you should have already installed and configured Affirm for Adobe Commerce (Magento)](https://docs.affirm.com/platforms/docs/magento-overview).

[Click here to review the Adobe Commerce Telesales module release notes](https://github.com/Affirm/Magento2_Affirm_Telesales/releases).

#### Sandbox Development

Develop and test the Affirm integration in your development environment connected to our sandbox. To use our sandbox, retrieve your sandbox API keys at <https://sandbox.affirm.com/dashboard/#/apikeys> for use during integration.

Note that we only send SMS messages with the checkout link from the Affirm Live environment. During Sandbox environment testing, use email messages for the checkout link.

After development and testing, you will need to update your integration to use your live API keys, which you can find at <https://affirm.com/dashboard/#/apikeys>.

***

## 1. Install the Adobe Commerce (Magento) Telesales module

[Download the Adobe Commerce (Magento) Telesales Add-on module here](https://github.com/Affirm/Magento2_Affirm_Telesales/releases). 

### Install using Composer

1. Go to **MAGENTO\_ROOT** and run the following command:

```shell
composer require affirm/magento2-telesales
```

2. Update the module by running the following commands:

```shell
composer update
php bin/magento setup:upgrade
php bin/magento setup:di:compile
```

\*\*

***

## 2. Configure the Adobe Commerce (Magento) Telesales module

After installing the Adobe Commerce (Magento) Telesales module, enable it by updating Adobe Commerce (Magento) configurations:

1. Sign in to your Adobe Commerce (Magento) admin portal.
2. Go to **Stores > Configuration > Sales > Payment Methods > Affirm > Affirm Telesales Extension**.
3. Set **Enabled** to **Yes**.
4. Under Affirm, keep **Mode** set to **Sandbox** (for development and testing) and make sure the rest of the settings are configured, such as  the **Public API** Key and **Private API Key** you retrieved from the Affirm sandbox merchant dashboard.
5. If your checkout process automatically captures the charge, set **Payment Action** to **Authorize and Capture**.

<Image border={false} src="https://files.readme.io/1edbc87-m2_telesales_config.png" title="m2_telesales_config.png" />

***

## 3. Test the Module

We only send SMS messages with the checkout link from the Affirm Live environment. During Sandbox environment testing, use email messages for the checkout link.

1. In your order management system, create an order.
2. Enter a valid U.S. address and mobile phone number (Affirm will not work with a fake address or phone number).
3. Select **Affirm** as the payment option.

<Image border={false} src="https://files.readme.io/7b32b94-m2_telesales_payment_method.png" title="m2_telesales_payment_method.png" />

4. Click **Submit Order** to place it in a pending state.
5. Under **Payment Information**, click **Send Affirm Checkout Link** button.

<Image border={false} src="https://files.readme.io/69cb3af-m2_telesales_checkout_button.png" title="m2_telesales_checkout_button.png" />

6. Find the email with the checkout link and click it.
7. If you have an existing account, click **Sign In**.
8. If you do not have an existing account, create one with the following:

* Any first and last name.
* An email address with a valid format.
* A valid U.S. cell phone number (you do not need access to this number) that you will use in all subsequent checkout attempts.
* A birth date older than 18 years old.
* Any four digits.

9. Enter the one-time 6-digit passcode, example: **123456** for the verification code and click **VERIFY CODE**.
10. Complete checkout flow and click **CONFIRM LOAN**.
11. Verify that the order is processed or complete in your order management dashboard.
12. Verify that the transaction appears in your platform's admin panel and on [sandbox.affirm.com/dashboard](https://sandbox.affirm.com/dashboard).

***

## 4. Go Live

### Step 1: Sandbox Development

Before going live with your Affirm integration, we suggest testing in in your development environment connected to our sandbox. To use our sandbox, retrieve your sandbox API keys at <https://sandbox.affirm.com/dashboard/#/apikeys> for use during integration.

After development and testing, you will need to update your integration to use your live API keys, which you can find at <https://affirm.com/dashboard/#/apikeys>.

### Step 2: Connect to the Live Affirm Environment

1. Retrieve your live API keys at <https://affirm.com/dashboard/#/apikeys>.
2. In the Magento 2 admin panel, go to **Stores > Configuration > Sales > Payment Methods > Affirm**.
3. Set **Mode** to **Production**.
4. Enter the **Public API Key** and **Secret Key** (private key) you just retrieved from the Affirm merchant dashboard.

### Step 3: Go Live!

After you have connected to our live environment and we have tested your integration, you are ready to go live and offer Affirm as a payment option to your customers.

***

## FAQ and Other Known Issues

1. How to solve compatibility issues with Magento 2.2.x\
   Magento 2.2.x version or lower will need to have the following functions replaced:\
   `addCommentToStatusHistory` --> `addStatusHistoryComment`

```php Controller/adminhtml/Checkout/Index.php:L187
// Update order history comment
$order->addStatusHistoryComment('Affirm checkout has been sent to the customer. Checkout token: '.$checkout_token, false, false);
```

Changes related to CsrfAwareActionInterface will need to be removed:\
`class Confirm extends Action implements CsrfAwareActionInterface` --> `class Confirm extends Action`

```php Controller/Payment/Confirm.php:L17
class Confirm extends Action
```

2. How to solve blank admin error page issue when installing under `MAGENTO_ROOT/app/code/`\
   Magento 2.2.x:

```php vendor/magento/framework/View/Element/Template/File/Validator.php:L113
{
    $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
    if (!is_array($directories)) {
        $directories = (array)$directories;
    }
    foreach ($directories as $directory) {
        if (0 === strpos($realPath, $directory)) {
            return true;
        }
    }
    return false;
}
```

Magento 2.3.x:

```php vendor/magento/framework/View/Element/Template/File/Validator.php:L114
$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
```

# Sibling pages

* [Install the Affirm Extension on Adobe Commerce (Magento)](https://docs.affirm.com/platforms/docs/magento-2-installation.md)
* [Configure Affirm for Adobe Commerce (Magento)](https://docs.affirm.com/platforms/docs/magento-2-configure-affirm.md)
* [Add Affirm Promotional Messaging to Adobe Commerce (Magento)](https://docs.affirm.com/platforms/docs/add-affirm-promotional-messaging.md)
* [Processing Affirm Transactions in Adobe Commerce (Magento)](https://docs.affirm.com/platforms/docs/processing-affirm-transactions-in-magento-2.md)
* [Multiple Financing Programs in Adobe Commerce (Magento)](https://docs.affirm.com/platforms/docs/magento-2-multiple-financing-programs.md)
* [Adobe Commerce (Magento) FAQ](https://docs.affirm.com/platforms/docs/magento-faqs.md)
* [How Does the Chrome SameSite Cookie Policy Affect my Adobe Commerce (Magento) Integration?](https://docs.affirm.com/platforms/docs/how-does-the-chrome-samesite-cookie-policy-impact-your-magento-integrations.md)