Skip to main content

Merchant Help Center

 

Affirm Merchant Help Center

Magento Integration

Download the Magento extension

Go to our GitHub site to download the Magento extension. 

Install the Magento extension

Use one of the following methods to install the Magento extension:

Install using modgit

<code>cd MAGENTO_ROOT modgit init modgit -i extension/:. add Magento_Affirm https://github.com/Affirm/Magento_Affirm.git

To update:

<code>modgit update Magento_Affirm

Install using modman

<code>cd MAGENTO_ROOT modman clone https://github.com/Affirm/Magento_Affirm.git

To update:

<code>modman update Magento_Affirm

Install using Magento Connect Manager

  1. Download the latest package release (compressed TGZ file)
  2. In the Magento admin panel, go to System > Magento Connect > Magento Connect Manager
  3. Upload the Magento_Affirm package

Install using Affirm's deploy script

  1. Download the Makefile (requires git, wget)
  2. Copy to MAGENTO_ROOT
  3. To install, run make install
  4. To update, run make update

Retrieve keys

  1. Sign in to https://sandbox.affirm.com/dashboard
  2. Retrieve API keys
    1. Hover over the profile icon area at the lower-left of the page.
      Screen Shot 2016-03-22 at 7.56.58 AM-2.png
    2. Click the API Keys link that appears.
      Screen Shot 2016-03-22 at 7.56.20 AM.png
    3. Copy the public, private, and financial product keys.

Note: If you are integrating Affirm into Shopify, ignore the financial product key and additional URLs. They are not relevant for Shopify integrations.

Configure the Affirm payment method

Once you've installed the Affirm extension, Affirm can be easily enabled as a payment method by updating the following configurations:

  1. Log in to your Magento Admin portal
  2. Visit System > Configuration > Sales > Payment Methods > Affirm
  3. Enter the Public API Key that you retrieved from the Affirm Merchant Dashboard
  4. Enter the Secret Key that you retrieved from the Affirm Merchant Dashboard
  5. Set the API URL
    • In a test environment, use
      https://sandbox.affirm.com
    • On your live site, use
      https://api.affirm.com
  6. Enter the Financial Product Key that you retrieved from the Affirm Merchant Dashboard
  7. If you currently automatically capture, change the Payment Action to Authorize and Capture
  8. Adjust the order-total minimum and maximum options to control when Affirm is shown to your customers
  9. If you want to change the order of displaying Affirm as a payment method during checkout, enter a number in Sort Order greater than 0
  10. If you want to disable Affirm when a backordered item is in the cart, change the Disable for backordered items to Yes
  11. If you want to change the appearance of Affirm to display as text instead of a logo during checkout, change Plain Text Appearance to Yes
  12. In-line HTML can be used to update the default Affirm logo and sub-text in the Affirm Payment Method HTML (Only available if Plain Text Appearance is set to No)
  13. Change the Enabled Checkout Button to Yes to display Affirm button on the cart page. Affirm Button URL can be updated in the Checkout Button Code

If you have problems with the changes not showing up immediately
  1. Visit System > Cache Management
  2. Click Flush Magento Cache
  3. Log out and log back in to reset permissions

Promos

To enable Affirm promotional banners on various pages across your site:  

  1. Visit System > Configuration > Affirm Promos
  2. In the General Settings, enter the Affirm Promo Key
  3. Change Enabled to Yes 
  4. Customize the Promo Size and Promo Position under individual Page Settings with any of the pre-defined values

Monthly Payment Pricing (As-Low-As)

To enable monthly payment pricing and modal on product description pages and shopping cart page:

  1. Visit System > Configuration > Affirm Promos
  2. In the As Low As Functionality settings, select Yes for Enable for Product PDP and Enable for Shopping Cart
  3. Optional: Customize the Affirm Apr Value and Affirm Promo Months (3, 6, 12)

Test your Affirm configuration

  1. Test your configuration to ensure that everything is working before you go live. Email  merchanthelp@affirm.com with a link to your test site so that we can verify your configuration and provide you with production keys.

    1. Add an item to the cart on your test site.
    2. Proceed to checkout.
    3. During checkout, enter valid U.S. addresses and mobile-phone information. Affirm cannot test your configuration if the address or phone information is fake.
    4. Select Affirm as the payment option.
    5. Proceed to Affirm's testing environment checkout.

    Note: The URL https://sandbox.affirm.com indicates that you are in the testing environment.

    6. When prompted for a security PIN, enter 1234.

    7. Select terms.

    8. Confirm your loan.

     

    9. Wait to ensure that you have been redirected to your confirmation page.

    10. Verify that the transaction appears in your platform's admin panel and on  sandbox.affirm.com/dashboard

    Note: When a customer completes checkout with Affirm as the payment method, Affirm authorizes a charge for the amount of the order. The charge appears in a pending state on the customer’s Affirm account. Authorized transactions expire if they are not captured before the capture deadline. The default capture deadline is specified in your partnership agreement with Affirm. If you did not specify your authorization-period requirements because of inventory, pre-orders, or shipping time in your onboarding form, please email merchanthelp@affirm.com for help with completing this process.

    Go live with Affirm financing

    After you verify that your configuration is working properly in the sandbox environment, your partnerships team activates your production keys in the dashboard.

    1. Sign in to the Affirm dashboard.
    2. Retrieve the production API keys.
      1. Hover over the profile icon area at the lower-left of the page.
        Screen Shot 2016-03-22 at 7.56.58 AM-2.png
      2. Click the API Keys link that appears.
        Screen Shot 2016-03-22 at 7.56.20 AM.png
      3. Copy the public, private, and financial product keys.
    3. Enter the production API keys into your platform.

      Note: In Shopify, clear the Use test mode check box when you enter your production API keys.

    Note: The email address that you use to access the dashboard must be registered as a Google account. Check to see if your existing email address is a Google account or create a new Google account. If you create a new account, use the same construction as the email address that you enter when you sign up without Gmail (for example, example@affirm.com becomes example@gmail.com) so that you don't need to send us a separate @gmail.com address.