Skip to content

Configuration

Controls the title, branding, and button label displayed in the payment sheet. Pass an instance to the configuration parameter of PaymentAction.

All properties are optional. Omit any you don't need and the default value will be used.

Configuration shape

Configuration(
    title: String?,
    branding: Branding?,
    buttonTitle: String?,
    enableCardScanning: Bool = false
)
PropertyTypeDefaultDescription
titleString?"Card Entry"Title displayed at the top of the payment sheet navigation bar.
brandingBranding?Finix default logoLogo image and label shown in the form header. See Branding.
buttonTitleString?"Tokenize"Label for the submit button.
enableCardScanningBoolfalseWhen true, offers a camera-based card scanning option on supported devices.

Branding

Branding shape

Branding(
    image: UIImage?,
    title: String?
)
PropertyTypeDefaultDescription
imageUIImage?Finix default logoLogo image displayed in the form header.
titleString?"Daphne's Corner"Label displayed next to the logo image.

image / title

image sets the logo image displayed in the form header. title sets the label displayed next to it.

let branding = Branding(
    image: UIImage(named: "MyLogo"),
    title: "My Company"
)

Sheet title & button

title / buttonTitle

Override the default sheet title and submit button label with your own strings. Common overrides: "Pay Now", "Confirm", "Submit".

Full example

Full example

Pass a Configuration instance to PaymentAction via the configuration parameter.

Configuration(
    title: title,
    branding: branding,
    buttonTitle: buttonTitle,
    enableCardScanning: enableCardScanning
)

Branding(
    image: UIImage(named: "MyLogo"),
    title: "My Company"
)

let branding = Branding(
    image: UIImage(named: "MyLogo"),
    title: "My Company"
)

Configuration(
    title: "Card Entry",
    buttonTitle: "Pay Now"
)

let branding = Branding(
    image: UIImage(named: "MyLogo"),
    title: "My Company"
)
let config = Configuration(
    title: "Card Entry",
    branding: branding,
    buttonTitle: "Pay Now",
    enableCardScanning: true
)
let paymentAction = PaymentAction(
    credentials: credentials,
    delegate: self,
    configuration: config
)