Skip to main content

Merchant Help

 

Affirm Merchant Help

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
Known issues

Column not found SQL errors: During the installation, make sure you have the correct permissions to update the tables. As the attributes are getting updated in a lot of database tables, you will need to reindex the flat category table to resolve SQL errors you may see during installation: 

  1. Go to System > Configuration > Catalog pane > Frontend
  2. Set Yes to Use Flat Catalog Category dropdown
  3. Click Save Config
  4. Go to System > Configuration > Index Management 
  5. Click Reindex Data for Category Flat Data 

You may need to run the re-index command via shell: php indexer.php --reindexall 

Upgrade the Magento Extension

These instructions are only applicable if you already have Affirm Magento extension installed and you are upgrading to a new version of the extension.

Upgrade 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
Upgrade using modman
<code>cd MAGENTO_ROOT modman clone https://github.com/Affirm/Magento_Affirm.git

To update:

<code>modman update Magento_Affirm
Upgrade using Magento Connect Manager
  1. In the Magento admin panel, go to System > Magento Connect > Magento Connect Manager
  2. Under Manage Existing Extensions, select Uninstall under Actions for Affirm_Affirm package name
  3. Complete the uninstallation by clicking on Commit Changes
  4. Download the latest package release (compressed TGZ file)
  5. In the Magento admin panel, go to System > Magento Connect > Magento Connect Manager
  6. 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
Known issues with upgrade 

Double banners: If you are upgrading from 2.x to 3.x version of the extension via SSH, double Affirm promo banners may be displayed. To fix this issue, remove the following from the Magento directory:

MAGENTO_ROOT/app/code/community/Affirm/Affirm/Model: Pricer.php
MAGENTO_ROOT/app/code/community/Affirm: AffirmPromo
MAGENTO_ROOT/app/design/frontend/base/default/template: affirmpromo
MAGENTO_ROOT/app/etc/modules: Affirm_AffirmPromo.xml
MAGENTO_ROOT/lib: Affirm

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.

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. Set Enabled to Yes 
  4. Keep the Mode set to Sandbox for development and testing 
  5. Enter the Public API Key that you retrieved from the Affirm Merchant Dashboard
  6. Enter the Secret Key that you retrieved from the Affirm Merchant Dashboard
  7. Enter the Financial Product Key that you retrieved from the Affirm Merchant Dashboard
  8. If you currently automatically capture, change the Payment Action to Authorize and Capture
  9. Adjust the order-total minimum and maximum options to control when Affirm is shown to your customers
  10. 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
  11. If you want to disable Affirm when a backordered item is in the cart, change the Disable for backordered items to Yes
  12. 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
  13. 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)
  14. 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
  15. Keep checkout uses xhr as Auto Detect
  16. Keep Create orders after Affirm confirmation as Yes. If you select No, orders are created as soon as a user begins the Affirm checkout flow

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, category and shopping cart pages:

  1. Visit System > Configuration > Affirm Promos
  2. In the As Low As Functionality settings, select Yes for Enable for Product PDP, Enable For Category PLP, Enable for Shopping Cart  to enable monthly payment pricing on product, category and cart pages
  3. Enter a MPP min amount value to set a minimum threshold amount for displaying monthly payment pricing.  Ex: Setting 100 as the value here will only display monthly payment pricing for products above $100
  4. Optional: Add a promo-id value in Default Affirm Promo ID (provided by the Affirm Client Success Team) 

Multiple Financing Programs

Multiple Financing Programs (MFPs) allows you to selectively offer a specific custom financing program to consumers based on product or cart attributes that are defined in Magento. MFP setup is optional and the values are provided by Affirm. For more information please visit Magento Multiple Financing Programs documentation


Order Processing

Whenever an authorize, void, invoice or credit memo is applied to an order in Magento, the request is sent to Affirm to update order status in Affirm Merchant Dashboard. See Daily Operations for details.


Test your Affirm configuration

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 your 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 Affirm Sandbox environment, your Affirm Client Success Manager will activate your Affirm Live environment access. This will allow you to sign into the Live version of the Merchant Dashboard, as well as access your Live API keys.

Retrieve Live API keys 

  1. Go to the API keys page in the Affirm dashboard.

    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. You can link your existing work email address to a Google account by signing up without Gmail.
     
  2. Retrieve your live API keys.
  3. Enter the live API keys into your integration/platform.
  4. Update the Mode to Production in System > Configuration > Sales > Payment Methods > Affirm.

 


Frequently asked questions

  1. How to update the merchant/brand name in the Affirm checkout flow if multiple sites are operated under same Affirm account? 

If you have multiple sites operating under a single Affirm account, you can override the external company/brand name that the customer sees by adding 'name' field to the checkout object. This affects all references to your company name in the Affirm UI. Checkout object in the Affirm Magento extension payment.php file can be updated to include the 'name' field.

'merchant' => array(
                'public_api_key' => Mage::helper('affirm')->getApiKey(),
                'user_confirmation_url' => Mage::getUrl('affirm/payment/confirm', array('_secure' => true)),
                'user_cancel_url' => Mage::helper('checkout/url')->getCheckoutUrl(),
                'user_confirmation_url_action' => 'GET',
                'charge_declined_url' => Mage::helper('checkout/url')->getCheckoutUrl(),\
                'name' => Mage::app()->getStore()->getFrontendName()
            ),