Affirm Split Pay Integration

How do I setup Affirm? 
Affirm provides innovative consumer financing that lifts sales and conversion for your e-commerce business. Affirm enables your customers buy now and pay over time in monthly payments. It integrates seamlessly into your checkout as an alternative payment method. When the Affirm payment method is selected by a customer in your checkout, they will be directed to the Affirm payment flow. In just a few easy steps, your customers can get approved and pay for their order with Affirm.
Affirm can be activated in just a few simple steps described below.
Getting started
To get started with Affirm, please message affirm at: or visit to sign up and obtain a merchant agreement, on-boarding form and sandbox API keys.
HTML (may need to be input if Affirm doesn't show up)
You will need to make sure you have this HTML in the One Page Checkout. If not, you'll need to add it in somewhere inside the payment methods part of the HTML. If you're not sure where to put it, contact Support for further assistance.
<div class="payment-method AffirmCheckout hide">
             <div class="panel pad-20">
               <div data-payment-name="AffirmCheckout" class="payment-name h4 bold">
                 <img src=""> &nbsp; Buy with Monthly Payments
               <ac:visibilityarea id="AffirmArea">
                 <div class="pad-t-20 AffirmCheckout-text">
                     You will be redirected to Affirm to complete payment once you have clicked <strong>Place Order</strong>.
Sandbox API Keys
Once you’ve obtained sandbox API keys from Affirm, you can enter the 3 keys (public, private, financial product) into your Spark Pay online store Apps & Addons dashboard for Affirm. (Tools > Apps & Addons) Make sure to check the "Use Sandbox” option when using your Affirm sandbox API keys.
When you have added your sandbox API keys through the dashboard, it is important to try a test transaction with Affirm to verify that it’s working properly on your site.
You can test this by create a test order and select Affirm as your payment option and complete the Affirm payment flow. Once the Affirm payment is complete, check the order status to make sure it’s been processed and then test refunding the order. 
Note: The Affirm sandbox does not create a real account so you can enter fake personal information on the create account screen. The Affirm sandbox also does not send text messages or emails so you can always use the security pin 1234 when logging in.
Affirm Promos
You may wish to put promotional Affirm banners on your site. Common places would be on the product page or on the shopping cart.
To place these banners use the merge code : ##AFFIRMPROMOTION##
The merge code takes an optional parameter called "promo-size", the default is "377x65"


Other valid options:

  • 349x63
  • 235x111
  • 559x55
Going Live
When you’ve tested the Affirm payment flow and you are ready to go live, please retrieve your API keys at the following locations:
To go live, simply substitute your production API keys for the sandbox keys and uncheck the “Use Sandbox” option.
Have more questions? Submit a request