Skip to main content

Merchant Help


Affirm Merchant Help

Miva Integration


The Affirm Miva Merchant integration:

  • Enables the Affirm payment method in your checkout
  • Adds Affirm promotional marketing messages to your product and cart pages
  • Manages orders paid with Affirm

Retrieve keys

  1. Sign in to
  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.


  1. Download the module - Make sure to extract the affirm.mvc file from the zip archive 
  2. Install the module: 
    1. Login to the Miva Merchant Admin screen
    2. On the left-side menu, choose Modules
    3. In the Modules screen, click the large + button on the right to open the Add Module screen
    4. Click the Upload button to open an Upload File window
    5. Click Choose File to open a file browser. Use the file browser to navigate to the location of the module (affirm.mvc) and select it
    6. Once you have selected the correct file, click Open
    7. Back in the Upload File window, click Upload
    8. Back in the Add Module window, click the + Add button
    9. The module is installed and now must be assigned to the store as a Payment module
  3. Assign module to your store
    1. In the Miva Merchant Admin screen, choose Payment from the left-side menu
    2. In the Payment Settings screen, Choose the Add/Remove modules tab
    3. The Affirm module (Buy with Affirm) will display in the Available Modules group
    4. Click the Install button to assign this module to your store



You must be using an OPAY screen with the Global Head item included and assigned to the page (default setup) to use the runtime payment processing feature. An item ( mvt:item name=”affirm” /> ) is automatically inserted into the Global Head template on assignment to the store. For Affirm banners/monthly promotional messaging, the Global Head item must be included and assigned to the BASK, PROD and SFNT pages (default setup).

Affirm as a payment method

After you have installed the module into your store and assigned it, Affirm can be easily enabled as a payment method by updating the following configurations:

  1. Log in to your Miva Merchant admin
  2. On the left side, go to Menu > Payment
  3. Click on Buy with Affirm tab
  4. In Runtime Settings, select Sandbox as the Operation Mode
  5. If you currently automatically capture the payment, change the Authorization Mode to Auth/Capture instead of Auth Only
  6. Make sure Active checkbox is checked
  7. Enter the Sandbox Product Key that you retrieved from the Affirm Merchant Dashboard
  8. Enter the Sandbox Public Key that you retrieved from the Affirm Merchant Dashboard
  9. Enter the Sandbox Private Key that you retrieved from the Affirm Merchant Dashboard
  10. Click Save Settings


Affirm Promotional Messaging

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

  1. Log in to your Miva Merchant admin
  2. On the left side, go to  Menu > Payment
  3. Click on Buy with Affirm tab
  4. In Monthly Promotional Messaging, check Show monthly promo checkbox
  5. Optional: If you do not want to display the Learn more link as part of the messaging, uncheck Show Learn More Link checkbox 
  6. Change the color of Affirm logo in the messaging by selecting the Logo Color as Blue or Black
  7. Optional: For custom monthly promotional messaging, include BASK page promo ID for the basket page and PROD page promo ID for the product pages (provided by the Affirm Client Success Team) 
  8. Click Save Settings



To enable Affirm banners on home, product, and cart pages:

  1. Log in to your Miva Merchant admin
  2. Visit Menu > Payment
  3. Click on Buy with Affirm tab
  4. In Banner Messaging, Check the checkbox next to the basket page (BASK), product page (PROD) and home page (SFNT) to display a banner on the selected page(s).
  5. Select the Promo size
  6. Click Save Settings


To insert monthly promotional messaging and/or Affirm banners into page templates:

  • Monthly promotional messaging – Place the MVT item ( <mvt:item name=”affirm” param=”showmonthly” /> ) in an appropriate location (near the price display) in the BASK/Basket Contents template or PROD/Product Display Layout template. Monthly messaging tags have the class affirm-as-low-as for styling with CSS. 
  • Affirm banners – place the MVT item ( <mvt:item name=”affirm” param=”showpromo” /> ) in an appropriate location (near the price display) in the BASK/Basket Contents template, PROD/Product Display Layout template, or SFNT template (for this location, you can choose Header/Footer, Content or main sub-templates as there is no price display). Affirm banner tags have the class affirm-promo for styling with CSS.

Miva Merchant software updates may update and replace page templates, including BASK, PROD and SFNT templates. You will need to manually copy the Affirm MVT items to their proper locations in each of the affected templates or else banners and monthly promotional messages will not display.

Test your Affirm configuration

Test your configuration to ensure that everything is working before you go live. Email 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 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

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 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. Go to Menu > Payment > Buy with Affirm and enter the live API keys.
  4. Set the Operation Mode to Production

Order Processing

Affirm module supports the following Order Processing functions. These functions appear to the right of an Orders > Payment section. 


  • In the Orders > Payment, click Capture. In the Capture window, click Capture.
  • You can only capture the full amount shown.
  • Partial captures are not supported.


  • In the Orders > Payment, click Void. In the VOID window, click Void.
  • You can only void the full amount shown. Partial voids are not supported.


  • In the Orders > Payment section, click Refund. Note: Refund is only available for order funds that have already been captured.
  • In the Refund window, the amount displayed is the full refund amount. Change the Refund Amount if required and click Refund.
  • Refunds can be either for a full or partial amount. Note: For multiple refunds, make sure Capture under Payment section is selected.