affirm.ui.components.create creates an Affirm component in the background to be rendered on-demand on your website, drastically reducing the impact of loading time.
This component feature was designed to reduce latency and offer more flexibility to merchants.
var promoComponent = affirm.ui.components.create(‘promo’, options)
See Options object.
The loan amount passed to display price specific messaging. The amount must be in cents.
The page type of the page the promo/messaging is on:
Sets the Affirm logo type. Default displays Affirm logo image:
Set the color on the Affirm logo:
Identifies the product category associated with the messaging for analytics tracking (e.g., electronics, furniture).
Identifies the brand category associated with the messaging for analytics tracking (e.g., Samsung, Goodyear).
Identifies the SKU associated with the messaging for analytics tracking.
Allows the merchant to select a specific promo id that they want to display. This will override the
Whether to show or suppress the modal link:
Updated over 2 years ago