Skip to main content

 

Affirm Merchant Help

BigCommerce Integration

Overview

This guide describes how to integrate Affirm into the BigCommerce Ecommerce platform so you can provide Affirm as a payment option to your customers. After integrating Affirm, your BigCommerce site will:

  • Offer Affirm as a payment option on the checkout page
  • Display Affirm promotional messaging

The integration steps are:

  1. Install and configure Affirm
  2. Review your order management functions
  3. Test your integration
  4. Deploy to production

Before you begin

Before beginning integration, you should review:

Sandbox development

You should have received an email inviting you to create an Affirm account. Click here for information about accessing your account.

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.

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

1. Install and configure Affirm 

1. Confirm Optimized one-page checkout

The Affirm app for BigCommerce requires the use of the optimized checkout. To change this:

  1. Go to Advanced Settings -> Checkout
  2. Confirm Checkout Type is set to Optimized one-page checkout

2. Affirm app installation

Affirm app for BigCommerce can be found on the BigCommerce marketplace. This app can also be installed from your BigCommerce dashboard by going to Apps and searching for Affirm. Once you click on install and confirm the terms and conditions, Affirm app will be installed in your store.

3. Configure Affirm as a payment method

Step 1: Add a payment method for Affirm

  1. For Blueprint only, before you add the payment method add the following block of css code to the Advanced Settings -> Web Analytics, this will hide the Payment option on the checkout, the affirm checkout script will unhide the option when it is finished loading.
    <style>
        .form-checklist label[for='radio-cod'] {
            display:none;
        }
    </style>
    
  2. In BigCommerce dashboard, select Store Setup > Payments
  3. Select Cash on Delivery under Offline Payment Methods
  4. Fill out the form
    • Add Display Name as Affirm (this is case sensitive)
    • Set Available Countries to United States
    • Add text for Delivery Information. This text will be displayed at order completion.
  5. Click Save

clipboard_ee55d93280cc799e167557b32db99a3f5.png

Step 2: Add Affirm scripts

  • If you are using Stencil, enable Affirm scripts:
  1. Go to Apps > Affirm > Installation
  2. Enable Script Manager Injected File: JQuery by clicking on Click to Install 
  3. Enable  Script Manager Injected File: Affirm Checkout by clicking on Click to Install 

Screen Shot 2018-12-11 at 5.33.32 PM.png

  • If you are using Blueprint, add a custom Affirm script to Google Analytics:
  1. In BigCommerce dashboard, select Advanced Settings -> Web Analytics
  2. Then select Google Analytics tab
  3. Copy and paste the code from step 3 in Blueprint Installation (under Affirm app installation) instructions in the in the tracking code text box
  4. Click Save

Step 3: Configure the Affirm settings

  1. Go to Apps > My Apps > Affirm > Settings
  2. Enter the Sandbox Public API Key and Sandbox Secret Key (private key) you retrieved from the Affirm sandbox merchant dashboard
  3. Leave Sandbox Mode enabled (for testing and development)
  4. Enable Modal Window if you would like Affirm checkout to launch in a modal window. If you would like Affirm checkout to launch in a redirect, leave this disabled.
  5. Enable Orders will be marked as Awaiting Fulfillment in Bigcommerce to automatically capture Affirm orders
  6. Enter the dollar amount values for Minimum Order and Maximum Order that will display Affirm as a payment option to your customers during checkout 
  7. Click Save
Screen Shot 2018-10-19 at 12.05.02 PM.png

 

Step 4: Configure Promotional Messaging

  1. Go to Apps > My Apps > Affirm Checkout > Promotional Messaging
  2. Toggle Promotional Messaging on Products to enable Affirm messaging on the product pages
  3. Toggle Promotional Messaging on Cart Page to enable Affirm messaging on the product page
  4. Enter the following for both product and cart page settings:
    • Site theme: We support the Cornerstone theme and any 3rd party theme need will need to add a div element to the product/cart page with an id, and place the id in the input field when Custom option is selected (See FAQ below for more details)
    • Height
    • Width
    • Promo ID
    • Minimum Product Price
    • Logo Type
    • Logo Color
  5. Click Save

clipboard_e9fa01199bf2f890fd06f2d0fc9251a21.png

2. Review your order management functions

For more information on processing orders in BigCommerce, refer to their documentation. Affirm app currently does not process order cancelations. Please use the Affirm dashboard to process refunds or cancel a loan.

3. Test your integration

After completing your integration, do a thorough testing of both your front-end and order management functions in our sandbox to ensure that everything works as expected. Click here for our recommended test plan. However, you’ll need to tailor your testing plan to your specific systems, processes, and integration.

4. Deploy to production

Coordinate testing with Affirm

Before deploying the Affirm integration to your production site, Affirm will need to test it in your development or staging environment connected to our live environment. Contact your Client Success Manager to coordinate this test.

Connect to the live Affirm environment

Contact your Client Success Manager for instructions on connecting to the Affirm live environment.

Launch to production

After you’ve connected to our live environment and we’ve tested your integration, you’re ready to deploy to your production environment and offer Affirm as a payment option to your customers.

FAQ

1. If I am using a custom theme, where can I find the Selector ID for the product and cart page promotional messaging?

For custom themes, we require a 'Selector ID' value so that Affirm promotional messaging can be easily added to the product and cart pages. You can use an existing selector ID or a class name available in your theme files. To find the selector ID, go to, Storefront > Current Theme > Advanced > Edit Theme Files, and search for product and cart related templates. Usually, the naming format for these files are product-view.html, product.html, cart.html, cart-view.html, etc. Use any existing class name or ID after which you want to add the promotional messaging. For the example below, productView-price is what should be used as the Selector ID:

<div class="productView-price">
    ......
    .....
</div>

If none of the existing classes or IDs from the product/cart templates are working, you can also add another div in your template right under the product or cart price and use this ID, customAffrimPromoContainer, as the Selector ID. Ex: <div id="customAffrimPromoContainer"></div>

2. I have the Affirm script installed in the script manager. Why isn't Affirm loading at checkout?

If Affirm is not getting loaded at checkout and the script was installed in the script manager, confirm that  {{{head.scripts}}} and {{{footer.scripts}}} tags are present in the checkout.html file.