Skip to main content

Merchant Help

 

Affirm Merchant Help

Kibo (MarketLive) Integration

Overview

Affirm Kibo (MarketLive) module enables the Affirm payment method in the checkout, as well as the promotional messages on the product and cart pages.


Installation

Install the code from GitHub  - https://github.com/Affirm/Kibo_ML_Affirm

Add the module to the client’s Affirm project’s site.xml
<sites>
  <deploy name="ylang">
    <section type="release" package="Marketlive-14" name="Platform" version="14.2.0.38"/>
    <section type="release" package="Marketlive-14" name="Integration/XMLBeans" version="14.2.0.38"/>
    <section type="release" package="Marketlive-14" name="Integration/Core" version="14.2.0.38"/>
    <section type="release" package="Marketlive-14" name="Apps/AppCommon" version="14.2.0.38"/>
    <section type="release" package="Marketlive-14" name="Apps/B2CWeb" version="14.2.0.38"/>
    <section type="release" package="Marketlive-14" name="Apps/Admin" version="14.2.0.38"/>
    <section type="release" package="Marketlive-14" name="Apps/IntegrationCLI" version="14.2.0.38"/>
    <section type="release" package="Modules" name="DataDeploy" version="14.2.0.38"/>
    <section type="source" package="sites/affirm_kibo_module/v14.2/trunk/source/Modules" name="DL-Affirm-Payment" version="1.0.0" />
    <section type="source" package="sites/affirm_kibo_module/v14.2/trunk/source" name="Apps/B2CWeb" version="14.2.0.38"/>
    <section type="release" package="Services" name="IntegrationWS/IntegrationWS-14" version="14.2.0.38" />
  </deploy>
</sites>

Note: Before starting the server with the module, make sure all the configurations are in place, or the site will not start correctly.

Add the Required Configurations and Messaging Properties 

Payment method settings:

1. Enable the Affirm Payment method by executing the following scripts:
    /DL-Affirm-Payment/database/scripts/01-AddAffirmOrderPaymentType.sql
    /DL-Affirm-Payment/database/scripts/02-AddOrderPaymentAffirmTable.sql
    /DL-Affirm-Payment/database/scripts/03-UpdateCapture&RefundJobs.sql
    /DL-Affirm-Payment/database/scripts/04-CreateVoidJob.sql
    /DL-Affirm-Payment/database/scripts/05-CreateVoidTypeColumn.sql
2. Create and publish all of the properties defined in:
    /DL-Affirm-Payment/database/mongo/AffirmCustomProperties.json
3. Create and publish all of the messaging defined in:
    /DL-Affirm-Payment/database/mongo/AffirmCustomResources.json

Job Set-up

1. In order to set up the Jobs required by the module, execute scripts 03, 04 & 05 and ensure success. 
2. Confirm all properties in AffirmCustomProperties.json are published to the desired environment.
3. Restart Admin JVM to populate Quartz Job Scheduling tables.
 


Retrieve keys

  1. Sign in to https://sandbox.affirm.com/dashboard
  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.

Configuration

Front-End Changes

Global:
In order to enable the "As low as" payment messaging features in all pages, include the Affirm SDK runtime code in the global layout page Main.jsp: /source/Modules/DL-Affirm-Payment/wwwroot/WEB-INF/views/layout/Main.jsp

Checkout:
Front end changes required for the checkout process are as follows:

  • Insert the Affirm SDK runtime JavaScript into Accordion Checkout
    • /Modules/DL-Affirm-Payment/wwwroot/WEB-INF/views/checkout/accordion/
    • Accordion.jsp
  • Add the new payment type on the Payment section
    • /Modules/DL-Affirm-Payment/wwwroot/WEB-INF/views/checkout/accordion/
    • PaymentAffirmCheckout.jspPaymentCreditCard.jsp
    • PaymentWithPaypal.jsp
  • Display the Monthly Payment Price feature at the summary level (only applies when BF is NOT enabled OR country is US and custom.affirmpayment_monthly_payment_cartsummary_enabled = true
    • /Modules/DL-Affirm-Payment/wwwroot/WEB-INF/views/checkout/accordion/
    • Summary.jsp
  • Modify the post-Confirm behavior to submit the Affirm checkout object & start the Affirm checkout process (customer is redirected to the affirm site to confirm the loan)
    • /Modules/DL-Affirm-Payment/wwwroot/includes/MarketLive/Checkout/accordion/
    • controllers.js
Property Settings Through Kibo Admin

1. Log in to the Kibo Admin console.

2. Go to Settings > Configuration Manager > Properties

kiboml-2.png

3. Find the specific property you want to change by entering its name into the Search box. Make sure there are no extra spaces in the property name. 

kiboml-3.png

4. To view property details, click the property that displays. In the property details, do not click the Remove button, as this will delete the property entirely. To set the value to zero, enter 0 or clear the field to remove the property value. 

 

Real-time or Delayed Payment Capture:

Your site will be configured to perform payment capture at the moment the order is placed or via a delayed job. This setting is configured at the time of implementation. 

 1. custom.affirmpayment_real_time_capture_call 

  • True  - real-time capture is enabled
  • False – deferred capture

 2. custom.affirmpayment_real_time_capture_order_status = ‘Confirmed’  by default

 

Enable the Affirm Payment Option:

Note: This is required for Affirm to be a payment option in Checkout. 

 1. Search for the following property: affirmpayment_paymentenabled = true
 2. The search result displays the property. Double-click on it to see the property details.  

 

Minimum Price Trigger:

Set the "minimum price" value for triggering the Affirm pricing message. This is required for Affirm pricing to display. 

1. Search for the following property: custom.affirmpayment_monthly_payment_min_price_range

2. The search result displays the property. Double-click on it to see the property details.  

3. Scroll down to change the Property Value. Do not include decimal points or dollar signs. For example, to set the minimum price to $50, enter "5000".  Note: Do not click the Remove button, as this will delete the property entirely. To set the value to zero, enter 0 or clear the field to remove the property value. 

4. Click the arrow on the "Save" button and select the desired environment.

kiboml-4.png

5. Confirm your choice to publish the change.

kiboml-5.png

 

Maximum Price Trigger:

Set the "maximum price" value for triggering the Affirm pricing message. This is required for Affirm pricing to display. 

1. Search for the following property: custom.affirmpayment_monthly_payment_max_price_range

2.  The search result displays the property. Click on it to see details.

3. Change the property value. Do not include decimal points or dollar signs. For example, to set the minimum price to $50, enter "5000". 

4. Click the arrow on the "Save" button and select the desired environment.

5. Confirm your choice to publish the change.

 

Affirm Kibo Pricing Display:

Affirm can be enabled via your site’s Kibo Admin to display the Affirm message on directory pages and/or Product Detail Pages.

  • Enable Display in View Cart - Enable the Affirm Monthly Payment option in the View Cart page by setting: custom.affirmpayment_monthly_payment_basket_enabled = true
  • Enable Display in the Global Cart - Set custom.affirmpayment_monthly_payment_globalcart_enabled = true 

 

Affirm Pricing Display On The Product Detail Page:
Enable or disable the Affirm pricing message on the product detail page. 

1. Search for the following property: custom.affirmpayment_monthly_payment_product_enabled

2. The search result displays the property. Click on it to see details.

3. Change the Property Value to either False or True:

kiboml-6.png

  • False – Affirm pricing and message will not display on the Product Detail Page. 
  • True – Affirm pricing and messaging will display on the Product Detail Page. 

4. Click the arrow on the "Save" button and select the desired environment. 
5. Confirm your selection to bring the change live.

 

Affirm Pricing Display on Directory Page Templates:
Enable or disable the Affirm pricing message and pricing on the Directory Page template 

1. Search for the property in the “Enter Text...” box: custom.affirmpayment_monthly_payment_directory_enabled

2. The search result displays the property. Double-click on it to see details. Change the Property Value:

  • False – Affirm pricing and message will not display on the Directory Page Templates.  
  • True – Affirm pricing and messaging will display on the Directory Page Templates. 

3. Click the arrow on the “Save” button and select the desired environment. 

4. Confirm your selection to bring the change live.

 

Affirm Messaging:

The message that accompanies the Affirm price can be configured under Settings > Configuration Manager > Site Messaging

kiboml-7.png

Search for: msg.resource.affirmPricingMessage and As low as $ dollarsParam with {0}

  • The parameter dollarsParam displays the lowest installment price. 
  • The {0} parameter displays the Affirm logo. 

Currently, you need to save the change, then publish it to the desired environment, then restart the server. The change in the property will change the message in catalog and PDP pages.

 

Using Affirm with the Kibo Discounting Engine:

All standard discounts are supported by the Affirm payment option. The Affirm payment API request will reflect the discount, and will include the description of the discount received by the customer. Note: Functionality to create a discount that is activated by using the Affirm payment method is currently NOT supported.

 

Note:

  • All the Affirm features are enabled for US only, which means that BorderFree is not enabled OR the selected country is US.
  • The KIBO-Affirm Module is currently implemented for KIBO versions v14.2, v15.1, v15.2 & v16.1 

 

Affirm Kibo Order Job Flow

This diagram shows the Affirm processes through the lifecycle of an order:
kiboml-1.png


Test your Affirm configuration

Test your configuration to ensure that everything is working before you go live. Email  merchanthelp@affirm.com 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 https://sandbox.affirm.com 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  sandbox.affirm.com/dashboard

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 merchanthelp@affirm.com 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.
  2. Retrieve your live API keys.
  3. Enter the live API keys into your integration/platform.

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.

Update Affirm URL and script references

  1. Affirm JS URL: https://cdn1.affirm.com/js/v2/affirm.js
  2. Affirm API base URL: https://api.affirm.com
  • In Kibo, the Production build will require a Publish of all properties and site messaging to the Staging and Production environments PRIOR TO the Staging/Production build.
  • A DBA will be required to execute the necessary database change scripts.