Payment Button

The Afterpay PaymentButton is a subclass of UIButton that can be scaled to suit your layout, to guarantee legibility it has a maximum width constraint of 256 points.

Below are examples of the button in each of the color schemes:

Mint and Black Black and White
Black on Mint button White on Black button
Mint on Black button Black on White button

There are also a few other kinds of payment available, with different wording:

  • Buy Now
  • Checkout
  • Pay Now
  • Place Order

Using a PaymentButton is easy. Configure it with some parameters sent to its initialiser. These parameters are optional, however.

let payButton = PaymentButton(
    colorScheme: .dynamic(
        lightPalette: .blackOnMint,
        darkPalette: .mintOnBlack
    ),
    buttonKind: .checkout
)