React Afterpay Checkout
Get startedUsageExamplesAPI

Usage

Examples

Basic usage

A very simple example.

Display text logo, image logo or both.

Theme

Different button styles. white-black is the default style.

Clearpay

When the countryCode='GB', the logo will be Clearpay.

API

PropertyDescriptionTypeDefault
token(required) checkout token to be used to complete payment.string-
countryCode(required) country code.string-
behaviormethod of launching the checkout page.enum: popup | redirectpopup
onCompletecallback when transaction is complete. popup mode only.(event: any) => void-
logodetermine how to display the logo.enum: image | text | allall
themecolor of button's background and label.enum: white-black | black-mint | mint-blackwhite-black
classNameclassname of button wrapper.string-
styleextra styles.React.CSSProperties-