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:
- Install and configure Affirm
- Review your order management functions
- Test your integration
- Deploy to production
Before you begin
Before beginning integration, you should review:
- The transaction flow when buying with Affirm
- Your current checkout process to understand how Affirm will affect operations and customer experience
- Settlement reports to know how to reconcile transactions with the deposits into your bank account
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:
- Go to Advanced Settings -> Checkout
- Confirm Checkout Type is set to Optimized one-page checkout (Recommended)
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
- In BigCommerce dashboard, select Store Setup > Payments
- Select Cash on Delivery under Offline Payment Methods
- Fill out the form
- Add Display Name as Affirm
- Set Available Countries to United States
- Add text for Delivery Information
- Click Save
Step 2: Add Affirm scripts
- If you are using Stencil, enable Affirm scripts:
- Go to Apps > Affirm Checkout > Installation
- Enable Script Manager Injected File: JQuery by clicking on Click to Install
- Enable Script Manager Injected File: Affirm Checkout by clicking on Click to Install
- If you are using Blueprint, add a custom Affirm script to Google Analytics:
- In BigCommerce dashboard, select Advanced Settings -> Web Analytics
- Then select Google Analytics tab
- Copy and paste this code in the tracking code text box
- Click Save
Step 3: Configure the Affirm settings
- Go to Apps > My Apps > Affirm Checkout > Settings
- Enter the Sandbox Public API Key and Sandbox Secret Key (private key) you retrieved from the Affirm sandbox merchant dashboard
- Leave Sandbox Mode enabled (for testing and development)
- 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.
- Enable Orders will be marked as Awaiting Fulfillment in Bigcommerce to automatically capture Affirm orders
- Enter the dollar amount values for Minimum Order and Maximum Order that will display Affirm as a payment option to your customers during checkout
- Click Save
Step 4: Configure Promotional Messaging
- Go to Apps > My Apps > Affirm Checkout > Promotional Messaging
- Toggle Promotional Messaging on Products to enable Affirm messaging on the product pages
- Toggle Promotional Messaging on Cart Page to enable Affirm messaging on the product page
- 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
- Promo ID
- Minimum Product Price
- Logo Type
- Logo Color
- Click Save
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.