Affirm Payment Gateway

The Affirm plugin extends WooCommerce, allowing your store to accept monthly payments for purchases.

  • Set a minimum/maximum spend to use Affirm as an option
  • Select whether to promote Affirm as a payment method
Note: Affirm is only available for checkout by U.S. customers, and your store must use USD as its currency.

Requirements ↑ Back to top

  • An SSL Certificate – see SSL and HTTPS for free and low-cost options.
  • Your store currency must be set to USD.
  • An Affirm account – Sign up or sign in with an existing account at

Installation ↑ Back to top

  1. Download the .zip file from your WooCommerce account.
  2. Go to: WordPress Admin > Plugins > Add New to upload the file you downloaded with Choose File.
  3. Activate the extension.

For more information, see Manage and Installing Plugins

Setup and Configuration ↑ Back to top

  1. Go to: WooCommerce > Settings > Payments.
    Note: ‘Payments’ formerly called ‘Checkout’ prior to WooCommerce 3.4.
  2.  Select Affirm. This takes you to the Settings screen.
  3. Enable/Disable – Enable to use. Disable to turn off.
  4. Enter a Title and Description shown to customers during checkout (optional).
  5. Enable Affirm Sandbox if developing or testing before going live. Remember to disable when done.
  6. Enter the Public API Key and Private API Key from your Affirm account.
  7. Select Transaction Mode
    • Authorize obtains payment authorization only
    • Authorize and Capture obtains authorization and captures funds.
  8. Select Checkout Mode
    • Modal triggers a pop-up during checkout
    • Redirect takes the customer offsite to check out
  9. Select Cancel Affirm Page
    • Cart Page – takes customer to cart
    • Payment Page – takes customer back to payment
  10. Enter your Affirm Promo ID (optional) to display Affirm with different styling, messaging, or loan terms. Contact Affirm for a Promo ID.
  11. Select an Affirm Color Blue, Black or White for the logo.
  12. Show Learn More to display a link in Affirm monthly payment messaging (optional).
  13. Promo Messaging – untick all boxes (recommended if you offer other preferred payment methods); tick boxes if you wish to promote Affirm as a payment plan method
    • Category
    • Product
    • Cart (see example in Customer Usage)
  14. Set Order Minimum (optional) – numerical value.
  15. Set Order Maximum (optional) – numerical value.
  16. Enable Debug if troubleshooting. Otherwise, leave disabled.
  17. Leave box unticked for Enable Enhanced Analytics.
  18. Save changes.

Force SSL ↑ Back to top

Your site/store is required to have a secure checkout and an SSL certificate.

  1. Go to: WooCommerce > Settings > Advanced.
    Note: Setting is under WooCommerce > Settings > Checkout > Checkout options prior to WooCommerce 3.4.
  2. Enable Force Secure Checkout.
  3. Save changes.

Customer Usage ↑ Back to top

What customers see on the front end when checking out.

Customers (U.S. only) can see promo messaging in cart, if you ticked the box for Cart page.

Customers (U.S. only) can select Affirm as a payment method on your store’s checkout page.

They are presented with the Affirm flow to complete payment and will see a screen with payment plans of different duration.

Order Reviews ↑ Back to top

Under WooCommerce > Orders, every order paid with Affirm contains a transaction number with link to the Affirm merchant portal at the top. You can also prompt Affirm to issue refunds from the order view.


Troubleshooting ↑ Back to top

Customer receives an error when attempting to pay via Affirm. ↑ Back to top

Ensure that you have input the correct keys; and you have entered live (not test) keys when in live mode.

Frequently Asked Questions ↑ Back to top

Affirm is not showing. ↑ Back to top

Confirm that:

  • Your site’s currency is set to USD. Go to: WooCommerce > Settings > General > Currency.
  • Customers have a U.S.-based billing address to use Affirm.
  • SSL is enabled.
  • Your site is in Live (not Test) mode.

Nothing happens when customer attempts to pay with Affirm. ↑ Back to top

This error may be caused by non-standard/poorly coded themes and JavaScript (JS) issues. Common issues include:

  • JavaScript errors on checkout page – To view the error, open your browser error console (in Chrome: View > developer > JavaScript console) and look for red errors. This should indicate where the error is located and lead you to the problem, e.g., Loading jQuery incorrectly
  • Failing to load scripts – Affirm loads JavaScript which it needs to function. If these are not loaded, you will see errors. Most common reasons are:
    • Theme is missing wp_head() or wp_footer() calls.
    • Old overridden template files from WooCommerce inside your theme.
    • Loading headers/footers in a non-standard way. WooCommerce uses get_header()’s get_header action to init the checkout and load scripts. If you are not using get_header() you either need to do so, or you need to trigger the get_header action manually using: do_action( ‘get_header ); in your custom header loader.

Is it possible to override templates on the Affirm pages? ↑ Back to top

No. These fixed/static pages from Affirm.

Why should the Enhanced Analytics box be unticked? ↑ Back to top

At this time the feature is inactive on stores. The information can only be accessed by an Affirm representative.

Questions and Feedback ↑ Back to top

Have a question before you buy? Please fill out this pre-sales form.

Already purchased and need some assistance? Get in touch with a Happiness Engineer via the Help Desk.

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top