- Step 1: Integrate Affirm into Salesforce Commerce Cloud (SFCC)
- Step 2: Configure Affirm for SFCC
- Step 3: Update your template files
- Step 4: Enable your order management functions & Test your integration
In this article we will cover all the required steps to integrate Affirm with your Salesforce Commerce Cloud (SFCC). There are several features you can enjoy using Affirm as a payment method, and we will walk you through their implementation. Let’s take a look at the process.
Step 1: Integrate Affirm into Salesforce Commerce Cloud (SFCC)
The Affirm Integration enables you to add a functional payment processor into SFCC to make the eCommerce experience easier and more enjoyable. By providing a set of useful features and marketing tools, the Affirm Integration allows you to process authorizations, captures, and refunds through the SFCC. To integrate Affirm as a payment option, follow these steps.
Note: Some of the steps in the following process will require technical documentation. To go deeper, please visit our Developers Site.
Download the Affirm cartridge
Step 2: Configure Affirm for SFCC
Once you have completed the installation, you can enable Affirm as a payment method by following these steps.
Enable Affirm as a Payment Method
- In the Business Manager go to Merchant Tools > Site Preferences > Custom Preferences > AFFIRM_PAYMENT.
- Set Affirm Online Status to Yes.
- Enter the Affirm Public Key and Affirm Private Key (Affirm Financial Product Key is deprecated) you retrieved from the Affirm sandbox merchant dashboard.
- Set Affirm Mode to Sandbox for testing.
- Set Affirm Payment Country Code to the country for which your account is enabled.
- If your checkout process automatically captures the charge, set Affirm Payment Action to Authorize and Capture.
- Enter the dollar amount values for Payment Min Total and Payment Max Total that displays Affirm as a payment option to your customers when checking out.
- Set Checkout Flow to Redirect (default) or Modal to control the Affirm checkout flow.
- Set Enable Affirm Analytics to Yes to enable analytics tracking for the order confirmation page. This is how the entire settings procedure looks:
- VCN Payment Instrument should be disabled unless virtual card integration is enabled for your merchant account.
- Leave the Financing program fields blank. This is now managed by Affirm unless you are offering multiple financing programs on a SKU, category or product level. To learn more about MFPs and how to set them up in Commerce Cloud, contact your Client Success Manager.
10. In the Business Manager, go to Administration > Operations > Services > Service Credentials.
11. Choose New.
12. Enter the following details:
- Name: Affirm
- User: Affirm Public Key
- Password: Affirm Private key
Add Affirm Promotional Messaging
By adding the Affirm Promotional Messaging you will include monthly payment messaging and Educational Modals on your product, category, and cart pages. Follow these steps to set these features.
- In the Business Manager main page, go to Merchant Tools > Site Preferences > Custom Site Preferences > Affirm.
- Set the following to Yes to display messaging on those pages:
- Product Promo Message (product pages)
- PLP Promo Message (category pages)
- Cart Promo Message (cart page)
- Enter a Promo Min Total value to set the minimum threshold dollar amount that will display monthly payment messaging (e.g., setting the Promo Min Total to 100 will only display monthly payment messaging for products above $100).
- If you have been provided with a Promo ID by the Affirm team, you can optionally enter a Promo ID value, to customize messaging (prepend the Promo ID value with default|data-promo-id and set Default financing program to default). Otherwise, leave all the "Financing Program" related fields blank.
Note: You can also use the Multiple Financing Programs (MFPs) to offer custom financing programs to your customers based on rules you define in Salesforce Commerce Cloud. To learn more about MFPs and how to set them up in Commerce Cloud, contact your Client Success Manager.
Step 3: Update your Template Files
- To update your template files, visit the Controls & Pipelines Cartridge Installation page and follow the steps for Templates.
Step 4: Enable your order management functions & Test your integration
Enabling your order management functions will allow SFCC to process orders (authorize, void, refund) and update the order status in the Affirm dashboard. You can also test your integration to see how everything works. Follow these steps and you’ll be ready to go live!
- Enable your order management functions by following this process.
- Test your integration out in the sandbox.
After adding the Affirm pay-over-time messaging and Affirm as a payment at checkout, you’re all set!
Note: While you can process orders in the dashboard, we strongly recommend using Commerce Cloud to keep order status synced with Affirm.
For testing out your integration, watch this video: