Payment Button
These docs are no longer maintained. The Afterpay iOS SDK guides have moved to the Cash App Afterpay developer docs for US merchants, and the Afterpay developer docs for other regions.
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 |
|---|---|
![]() | ![]() |
![]() | ![]() |
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
)



