Display Afterpay or Clearpay messagingDeprecated
Inform customers that you accept payments with Afterpay (also known as Clearpay in the UK).
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 afterpayClearpayMessage
Element, but has halted new feature development.
Let your customers know you accept payments with Afterpay by including the Afterpay messaging Element on your site. We suggest adding the messaging Element to your product, cart, and payment pages. The afterpayClearpayMessage Element takes care of:
- Calculating and displaying the installments amount
- Displaying the Afterpay information modal
- Localizing text and currencies
Include the Element
Customize the message
There are many options available to customise the appearance and contents of the messaging Element. See the API reference for the full list of options.
Badge logo
Set logoType
to 'badge'
and use the badgeTheme
option to choose between the following styles:
black-on-mint | black-on-white | mint-on-black | white-on-black |
Lockup logo
Set logoType
to 'lockup'
and use the lockupTheme
option to choose between the following styles:
black | white | mint |
Note
Clearpay branding is displayed automatically based on the locale
option. See Locale and currency for details.
Style with CSS
In addition to the configuration options, use CSS to style the messaging to better fit the look and feel of your site. You can customize the font-family
, font-size
, and color
of the messaging:
.AfterpayMessage { font-family: monospace; font-size: 14px; color: blue; }
You can also control the size of the logo by setting its width
and height
:
.AfterpayMessage-logoSvg { width: 80px; height: auto; }
Handle ineligible items
You can’t use Afterpay for certain prohibited business categories. If you sell items in these categories, you can still display the messaging Element to clearly indicate Afterpay isn’t available.
Use the isEligible
or isCartEligible
options to indicate that the current product or cart isn’t eligible:
isEligible: false | |
isCartEligible: false |
Afterpay also has default transactions limits for each country. When the provided amount
exceeds these limits, the Element automatically displays ineligible price range messaging. You can customise this message by hiding the lower or upper limit with showLowerLimit
and showUpperLimit
.
(default) | |
showLowerLimit: false | |
showUpperLimit: false |
Locale and currency
Afterpay and clearpay support the following locales and currencies:
Supported locales: en-US
, en-CA
, en-AU
, en-NZ
, en-GB
Supported currencies: USD
, CAD
, AUD
, NZD
, GBP
Afterpay’s messaging always the appropriate number of instalments a user can pay based on their locale and country. For more information, see payment collection.