---
updatedAt: 2026-03-23T20:47:11.000Z
agentTools:
  siteIndex: https://docs.affirm.com/llms.txt
  projectIndex: https://docs.affirm.com/platforms/llms.txt
---

# Set up WooCommerce

Add Affirm to WooCommerce with minimal setup. Learn requirements, install the plugin, configure checkout, enable messaging, test, and manage transactions.

<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 class="product-item">
          <img src="https://files.readme.io/db98461fef617df7c9970e98f01150f067fcee1fc823a450f09056138b9f70be-united-kingdom-flag-rounded-icon-uk-flag-union-jack-vector.jpg" alt="UK" class="flag-icon">
          UK
        </div>
      </div>
    </div>

  </div>
`}</HTMLBlock>

## Overview

WooCommerce enables merchants to add Affirm as a payment method through the official Affirm WooCommerce extension.

Once configured, your WooCommerce store can:

* Display **Affirm as a payment option at checkout**
* Process **Affirm charges through WooCommerce order management**
* Display **Affirm promotional messaging** across your storefront
* Manage **captures, voids, and refunds** directly from the WooCommerce admin panel

The integration requires minimal development effort and can be installed through the WordPress plugin system.

## Eligibility and requirements

### Affirm requirements

Before enabling Affirm on WooCommerce:

* Your business must be **approved by Affirm**
* You must obtain your **Affirm Public Key and Private API Key** from the [Affirm merchant dashboard](https://www.affirm.com/dashboard/signin)
* Financing disclosures must use **Affirm-approved language**
* Your checkout must collect **required shopper identity information**

### WooCommerce requirements

Your store must meet the following requirements:

* A **WordPress site with WooCommerce installed**
* Access to the **WordPress admin dashboard**
* Permission to install **WordPress plugins**
* Access to **WooCommerce payment settings**

## Integration steps

### Step 1: Install the Affirm WooCommerce extension

1. Download the [Affirm WooCommerce extension](https://woocommerce.com/products/woocommerce-gateway-affirm/).
2. Log in to your **WordPress Admin dashboard**.
3. Navigate to **Plugins → Add New**.
4. Click **Upload Plugin**.
5. Click **Choose File** and select the downloaded extension file.
6. Click **Install Now**.
7. Click **Activate** to enable the plugin.

<Image align="center" border={true} width="500px" src="https://files.readme.io/c2fd6b21150e35c934d4839bdc4941aa9bddb68410b279214eea6c92b5811c04-WooCommerce_app_download.svg" className="border" />

After activation, Affirm becomes available as a payment method within WooCommerce.

### Step 2: Enable Affirm in WooCommerce

1. In your **WordPress Admin dashboard**, navigate to: **WooCommerce → Settings → Payments**.

<Image align="center" border={true} src="https://files.readme.io/436a80b36e9e7796d920cfb9fae66120bb76f93061d5451c238eff15aae08b9d-WooCommerce_payment_methods.svg" className="border" />

2. Locate **Affirm** in the list of payment methods.
3. Click **Manage** (or select **Affirm**) to open the configuration page.
4. Toggle **Enable Affirm** to activate the payment method.

If shown, keep the default values unless instructed otherwise:

**Title:**
Affirm Pay over time

**Description:**
You will be redirected to Affirm to securely complete your purchase. It's quick and easy—get a real-time decision.

<Image align="center" border={true} width="600px" src="https://files.readme.io/fc4ae4b9c63d56b3249e3d8cd2414e18f2fa676c154d5c69c52243f76b89166b-WooCommerce_enable_affirm.svg" className="border" />

### Step 3: Configure Affirm account settings

1. Select **Expand** under **Affirm Account Settings**.
2. Enable **Affirm Sandbox** if you are testing your integration.
3. Set your **Region** (for example, select **US** for US stores).
4. Enter your **Affirm Public Key** from the Affirm merchant dashboard.
5. Enter your **Affirm Private API Key** from the Affirm merchant dashboard.
6. Select the **Language Selector** behavior:
   * Site Language
   * Browser Language

### Step 4: Configure checkout behavior

1. Select a **Transaction Mode**:
   * **Authorize**
     Only authorizes the payment.
   * **Authorize and Capture**
     Authorizes and captures payment automatically.
2. Enable **Partial Capture** only if instructed by Affirm support.
3. Select a **Checkout Mode**:
   * **Modal**: Displays an Affirm popup during checkout.
   * **Redirect**: Redirects the customer to Affirm checkout.
4. Enable **Inline Checkout Messaging** to display Affirm financing messaging during checkout.

### Step 5: Configure checkout cancellation behavior

1. Choose where customers are redirected if they cancel Affirm checkout:
   * **Cart Page**: Takes customer to cart.
   * **Payment Page**: Takes customer back to payment.
   * **Checkout Page**: Takes customer back to checkout.
   * **Custom URL**: Takes customer to custom URL.
2. If **Custom URL** is selected, enter the **Permalink / Custom Cancel URL**.

<Image align="center" border={true} width="600px" src="https://files.readme.io/7ec6b63be33fd1ed040d7f9fc1f77b66dbe8628cb6a8b4da568c6b10b1b76d60-WooCommerce_custom_URL.svg" className="border" />

### Step 6: Configure promotional messaging

1. Expand **Promotional Messaging Settings**.
2. Configure how Affirm promotional messaging appears across your store. Below are some promotional messaging options:
   1. Check to Enable category promotional messaging to include promotional messaging on category level pages.
   2. Check to Enable product promotional messaging to include promotional messaging on product level pages and select placement of product page messaging. (if unsure, select After Product Price.)
   3. Check to Enable cart promotional messaging to include promotional messaging on category level pages.
   4. Select an Affirm Color - Blue, Black or White for the logo.
   5. Check Show Learn More to display a link in Affirm monthly payment messaging.
3. Enter your **Affirm Promo ID** (*optional*) to display Affirm with different styling, messaging, or loan terms. Only enter a Promo ID if instructed by Affirm.

<Image align="center" border={true} width="600px" src="https://files.readme.io/816ad8ef75f41a76652afbd243dd7437b4a1011ab9fcc5b06a3a0efba97ea1cf-WooCommerce_promo_messaging_settings.svg" className="border" />

4. (*Optional*) Select **Expand** next to **Advanced Settings**.
5. **Set Order Minimum** – set minimum cart total to display Affirm as a payment option. If unsure, leave the **default value of $50**.
6. **Set Order Maximum** – set maximum cart total to display Affirm as a payment option. If unsure, leave the **default value of $30000**.
7. Select **Enable Debugging messages** if troubleshooting. Otherwise, leave disabled.
8. Leave **Enable Enhanced Analytics** unchecked.
9. Check to **Display Merchant Fee**. If unsure, leave the default.

<Image align="center" border={true} width="600px" src="https://files.readme.io/c47321b0d28db2cb53e51a6ae060a900d0c8c604cf98210dc6057c7885c0a97f-WooCommerce_merchant_promo.svg" className="border" />

10. **Save** your configuration settings.

Promotional messaging helps increase awareness of Affirm financing options before checkout.

### Step 7: Test the integration

<Callout icon="🚧" theme="warn">
  Affirm sandbox

  Disable when testing is complete.
</Callout>

Before going live:

1. Enable **Sandbox mode**.
2. Enter **sandbox API credentials**.
3. Place a **test order** using Affirm.
4. **Confirm** checkout flow, authorization, and capture behavior.

### Step 8: Go live

When testing is complete:

1. Disable **Sandbox mode**.
2. Enter your **live Affirm API credentials**.
3. Save settings.
4. Begin accepting **live Affirm payments**.

## Inline checkout

<Callout icon="🚧" theme="warn">
  Inline support

  * Inline is available for our **Installment**, **<Glossary>Pay in 4</Glossary>**, and **Hybrid** financing options.
  * **Affirm Lite** and Adaptive Checkout are not supported at this time.
</Callout>

When a customer selects Affirm as a payment option, the view expands and renders the following information in your site:

* **Value props**: Highlights some of the benefits of paying with Affirm.
* **Learn more about Affirm**: A learn more link that opens our educational modal.
* **Payment timelines**: The timeline and amount for each payment.

<Image align="center" alt="This image displays the Inline flow for Split pay and Installment options" caption="This image displays the Inline flow for <Glossary>Pay in 4</Glossary> and Installment options." src="https://files.readme.io/9a33c35fca99d7b76c73ce79f3ad259f2debcb7ca9d392f460d7d837a13323f3-WooCommerce_inline_ux_design_update.svg" width="600px" />

## Processing Affirm transactions

When a customer selects Affirm at checkout, Affirm authorizes the charge and places it in a pending state until captured.

Merchants can manage transactions directly within WooCommerce.

### Capture a charge

Capturing a charge:

1. Charges the authorized amount to the customer’s Affirm account.
2. Starts the customer’s billing cycle.
3. Initiates the transfer of funds from Affirm to the merchant.

Merchants typically capture charges after fulfilling the order.

### Void a charge

If a charge has not been captured:

1. Locate the order in WooCommerce.
2. Select **Void authorization**.

Voiding cancels the authorization and the transaction cannot be reinstated.

### Refund a charge

If a charge has been captured:

1. Locate the order in WooCommerce.
2. Select **Refund**.

Refunds **must occur within 120 days** of capture and are irreversible.

### Partial refund

You can issue a partial refund for a captured transaction **within 120 days of capture**.

### Partial capture

Partial Capture allows merchants to capture portions of an authorized transaction as items are shipped. This is especially useful for multi-item orders that are fulfilled at different times, allowing you to capture payment only for the items that have been shipped while keeping the remaining authorization open.

You can learn more about Partial Capture, [here](https://docs.affirm.com/platforms/docs/woocommerce-using-partial-capture).

## Recommended topics

* [WooCommerce](https://docs.affirm.com/platforms/docs/woocommerce-overview)
* [Using Partial Capture](https://docs.affirm.com/platforms/docs/woocommerce-using-partial-capture)
* [WooCommerce FAQs](https://docs.affirm.com/platforms/docs/woocommerce-faqs)

# Sibling pages

* [Using Partial Capture](https://docs.affirm.com/platforms/docs/woocommerce-using-partial-capture.md)
* [WooCommerce FAQs](https://docs.affirm.com/platforms/docs/woocommerce-faqs.md)

# Other helpful resources

Nice work on successfully setting up your Affirm integration! Next, you may want to learn about processing transactions with us. You can also checkout our WooCommerce FAQs for answers to some common questions Affirm + WooCommerce integration.

* [Process Affirm transactions on WooCommerce](https://docs.affirm.com/platforms/docs/process-affirm-transactions-on-woocommerce.md)
* [WooCommerce FAQs](https://docs.affirm.com/platforms/docs/woocommerce-faqs.md)