Skip to content

Default form styling

Last updated: October 20, 2022

Our default integration is the quickest way to display the forms required to collect payment information, with no customization required.

Localization support for Arabic, Dutch, English, French, German, Italian, Romanian, and Spanish languages is built into the default integration, but you can also add your own localized strings to add support for additional languages.

The payment form with left to right text
The payment form with right to left text

For basic customization, the DefaultPaymentFormStyle and DefaultBillingFormStyle objects expose properties that allow you to change the text and colors displayed on the forms.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Create a new DefaultPaymentFormStyle object
var paymentFormStyle = DefaultPaymentFormStyle()
// Change the payment form's background color
paymentFormStyle.backgroundColor = UIColor.darkGray
// Change the card number field's placeholder value
paymentFormStyle.expiryDate.textfield.placeholder = "00 / 00"
// Change the payment button text
paymentFormStyle.payButton.text = "Pay £54.63"
// Create a new DefaultBillingFormStyle object
var billingFormStyle = DefaultBillingFormStyle()
// Change the billing form header's font color
billingFormStyle.header.headerLabel.textColor = UIColor.darkGray
// Change the billing form header text
paymentFormStyle.header.headerLabel.text = "Billing info"
// Wrap the styling in a PaymentStyle wrapper
let paymentStyle = PaymentStyle(paymentFormStyle: paymentFormStyle,
billingFormStyle: billingFormStyle)

See our example project on GitHub.