Skip to main content


Affirm Merchant Help

Salesforce Commerce Cloud SFRA Integration


Install Affirm

Affirm Salesforce Commerce Cloud (Demandware) cartridge is certified by Salesforce and supports Storefront Reference Architecture (SFRA) Site Genesis. If your site is using pipelines or controllers based Site Genesis, refer to this page. Installing the Affirm cartridge requires developer access to your Site Genesis instance. 

  1. Download the cartridge: (In the "Integration & Documentation" section)
  2. Install the cartridge
  3. Sync your Site Genesis site
  4. Configure the Affirm payment method
  5. Enable Affirm promotional marketing assets
Installation for SFRA site genesis

Import Affirm cartridge to a workspace in Salesforce UX Studio


2. Add Affirm cartridge to Project Reference of Server Connection


3. Wait until Studio completes workspace built and uploading source codes to a sandbox

4. Go to Business Manager > Site -> Manage Sites. Select the site, then select Settings. In cartridge path at the end write the following: int_affirm_mobile_first:int_affirm_overlay

5. Upload affirm_meta.xml

1. Go to Administration > Site Development > Import & Export 

2. Click Upload in Import & Export Files and select affirm_meta.xml (Cartridge source code > metadata folder)


3. Click Import in Meta Data and select affirm_meta.xml


6. Upload affirm_payment.xml

1. Go to Merchant Tools > Ordering > Import & Export 

2. Click Upload and select affirm_payment.xml (Cartridge source code > metadata folder)


3. Click Import in Payment Methods and select affirm_payment.xml


7. Upload affirm_assets.xml

1. Go to Merchant Tools > Content > Import & Export

2. Click Upload and select affirm_asset.xml (Cartridge source code > metadata folder)


3. Click  Import in Libraries and select affirm_asset.xml


8. Upload affirm_slots.xml

1. Go to Merchant Tools > Online Marketing > Import & Export 

2. Click Upload and select affirm_slots.xml (Cartridge source code > metadata folder)


3. Click Import in Content Slots and select affirm_slots.xml


9. Go to Merchant Tools > Ordering > Payment Processors. Click NEW button and create payment processor with ID - AFFIRM_PAYMENT

10. Verify that Site Preferences group was created with ID - AFFIRM_PAYMENT and nameAffirm

11. Verify that Payment Method was created with ID - Affirm and nameAffirm. Enable Affirm payment method

12. You can add an image or a text for your payment method by updating content asset affirm-payment-method

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.

Configure the Affirm payment method

Order Processing

Setup Capture, Void, Refund, and Update services

1. Go to Administration > Operations > Import & Export

2. Click Upload button to upload affirm_services.xml file

3. Click Import and select affirm_services.xml file

Configure Affirm Job Schedule

1. Go to Administration > Operations > Import & Export

2. Click Upload to upload affirm_jobs_mfra.xml file

3. Click Import and select affirm_jobs_mfra .xml file

4. Go to Administration > Operations > Job Schedules 

5. Verify that each imported job was created

6. Go to AffirmCapture job and click on Sites tab

7. Check your site and click Apply

8.  Repeat step 6-7 for other jobs

Steps on how to process Affirm transactions can be found here.

Test your Affirm configuration

Test your configuration to ensure that everything is working before you go live. Contact Merchant Help 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 contact us for help with completing this process.