Display Affirm messagingDeprecated
Increase conversion by informing customers that you offer Affirm ahead of checkout.
Caution
The content in this topic refers to a Legacy feature. We recommend that you use the Payment Method Messaging Element to dynamically show your customers relevant buy now, pay later payment options for a given purchase. Stripe continues to maintain continuity for the affirmMessage
Element, but has halted new feature development.
Let your customers know you accept payments with Affirm by including the Affirm messaging Element on your site. We suggest adding the messaging Element to your product, cart, and payment pages. The Affirm messaging Element takes care of:
- Calculating and displaying the installments amount
- Displaying the Affirm information modal
Include the Element
Caution
Affirm’s minimum transaction amount is 50 USD or 50 CAD. The promotional message isn’t rendered if the amount parameter is set to a number less than 50 USD or 50 CAD.
Customize the message
There are many options available to customize the appearance and contents of the messaging Element. See the API reference for the full list of options.
Logo color
Use the logoColor
option to choose between the following styles:
primary | black | white |
Style with CSS
Additional configuration options allow you to use CSS to style the messaging to better fit the look and feel of your site. You can customize the fontColor
, fontSize
, and textAlign
of the messaging:
const options = { amount: 5000, currency: 'USD', fontColor: '#5B63FF', logoColor: 'black', fontSize: '16px', textAlign: 'center', }; const affirmMessageElement = elements.create('affirmMessage', options);