Cardinal Commerce
Integrate Affirm into the Cardinal Commerce e-commerce platform.
Overview
This guide describes how to integrate Affirm into the Cardinal Commerce platform so you can provide Affirm as a payment option to your customers. After integrating Affirm, your Cardinal Commerce site will:
- Offer Affirm as payment option on the checkout page
- Process Affirm charges in your order management system
- Display Affirm promotional messaging
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
- The timeline for receiving Affirm deposits into your bank account
Sandbox development
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.
Install and configure Affirm
Please reach out to your Client Success Manager for instructions on installing and configuring Affirm and adding Affirm promotional messaging on Cardinal Commerce.
Review your order management functions
Processing orders (authorize, void, refund, and partial refund) in Cardinal Commerce updates the order status in the Affirm dashboard. While you can process orders in the dashboard, we strongly recommend using Cardinal Commerce to keep order status synced with Affirm. For more information on processing orders in Cardinal Commerce, refer to their documentation.
Add the Confirmation Page function (Optional)
When a customer completes their purchase, you can send their order and product information to Affirm for A/B testing, which will help you optimize your site. Send this information by adding the Confirmation Page function to your payment confirmation page. We only require orderId, total, productId, and quantity for A/B testing.
Click here for all the Confirmation Page function parameters.
affirm.analytics.trackOrderConfirmed({
"paymentMethod": "Visa",
"orderId": "T12345",
"total": 3739
}, [{
"productId": "SKU-1234",
"quantity": 1
}, {
"productId": "SKU-5678",
"quantity": 1
}]);
Required function parameters
Order object
Attributes | Type | Description |
---|---|---|
paymentMethod | string | The payment method chosen by the customer (e.g., Visa). Maximum 150 characters. |
orderId | string | Your internal unique identifier representing the order. Maximum 500 characters. |
total | integer | The total amount of the transaction, including tax and shipping, stated in USD cents (e.g., $100 = 10000). |
Product object
Attributes | Type | Description |
---|---|---|
productId | string | Your internal unique identifier representing the product, such as the SKU or an internal database identifier. Maximum 500 characters. |
quantity | integer | The quantity of the purchased product. |
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 Integration Consultant or [email protected] to coordinate this test.
Deploy to production
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.
Updated over 1 year ago