Skip to main content

iOS Unified Checkout Customization

You can customize the iOS Unified Checkout to support your checkout context and brand guidelines by changing fonts, colors, shapes, and layouts.
Create a PaymentSheet.Configuration object with an appearance object to match the design of your app.

Fonts

Set typography.fontResId to your custom font’s resource ID to customize your font. Set a typography.sizeScaleFactor multiplier to increase or decrease the font size.
var configuration = PaymentSheet.Configuration()
configuration.appearance?.font?.base = UIFont(name: "Helvetica", size: UIFont.systemFontSize)!
configuration.allowsDelayedPaymentMethods = true
configuration.defaultBillingDetails = [
    "address": [
        "city": "San Francisco",
        "country": "US",
        "line1": "1467",
        "line2": "Harrison Street",
        "postalCode": "94122",
        "state": "California"
    ],
    "email": "[email protected]",
    "name": "John",
    "phone": "1234567890"
]

Colors

Modify the color categories in PaymentSheet.Colors to customize the colors on the mobile payment sheet as follows:
Color CategoryUsage
appBarIconColor used for icons in the payment page (e.g., close (x) button)
componentBackground color of inputs, tabs, and other components
componentBorderBorder color for inputs, tabs, and other components
componentDividerColor for divider lines used inside inputs, tabs, and other components
errorColor for error messages to the user on the payment page
onComponentColor of text and other elements inside components
onSurfaceColor for items appearing on the surface of the payment page (e.g., text prompts)
placeholderTextColor for input fields placeholder text
primaryThe primary color to be used across the payment page
subtitleColor of secondary text like prompts for input fields
surfaceColor of the payment page

Shapes

Modify the corner radius and border width used across the payment page using appearance.shapes.
Shape CategoryUsage
borderStrokeWidthDpWidth of the border used across input fields, tabs, and other components of the payment page
cornerRadiusDpCorner radius of the input fields, tabs, and other components
Now you can test the payments on your app and go live!