Customization

iOS Unified Checkout Customization

You can customize the iOS Unified Checkout to support your checkout context and brand guidelines by changing fonts, colours, shapes and layouts.

Create a PaymentSheet.Configuration object with an appearance object in order to be able 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 Fransico",
        "country": "US",
        "line1": "1467",
        "line2": "Harrison Street",
        "postalCode": "94122",
        "state": "California"
      ],
      "email": "johndoe@hyperswitch.io",
      "name": "John",
      "phone": "1234567890"
    ]

Colors

Modify the colour categories in PaymentSheet.Colors to customize the colours on the mobile payment sheet as follows:

Shapes

Modify the corner radius and border width used across the payment page using appearance.shapes.

Now you can test the payments on your app and go-live!

Last updated