Payment methods
Style the wallet button container, the payment form container, APM input fields, and section dividers in the Universal checkout form.
The checkout form displays wallet buttons, alternative payment method buttons, APM input fields, and section dividers outside the card form area. Use the style keys on this page to control how each of these regions looks.
Wallet buttons
The apmButtons key styles the container that wraps wallet buttons (Google Pay, Apple Pay).
style: {
apmButtons: {
borderRadius: '8px',
padding: '12px',
backgroundColor: '#f9fafb',
}
}Payment form container
The expressCheckout key styles the large container that wraps the alternative payment method buttons (for example, Neosurf and paysafecard), the "Pay with" and "Pay with card" dividers, and the card form.
style: {
expressCheckout: {
borderRadius: '8px',
padding: '12px',
backgroundColor: '#f9fafb',
}
}APM input fields
When a customer selects an APM, the form can render additional input fields, such as a bank selector for iDEAL.
The paymentMethodFields key styles the input fields that APMs render in the radio layout (alternatives: 'radio' on checkout.universal()). It has no effect in the default button layout:
style: {
paymentMethodFields: {
label: {
color: '#6b7280',
fontSize: '12px',
fontWeight: '500',
},
input: {
border: '1px solid #d1d5db',
borderRadius: '8px',
}
}
}Section dividers
Dividers are the horizontal lines with text labels that separate sections of the form. There are four named dividers:
| Key | Position |
|---|---|
dividers.payWith | Between the wallet button and the alternative payment method buttons. |
dividers.payWithCard | Between the alternative payment method buttons and the card form. |
dividers.savedPaymentMethods | Above the saved payment methods list. Only visible when the customer has saved cards. |
dividers.showOtherWaysToPay | Appears when a customer has saved cards. Clicking it expands the full form with APMs and the card form. |
Each divider accepts a text key for the label and a divider key for the line:
style: {
dividers: {
payWith: {
text: { color: '#9ca3af', fontSize: '12px' },
divider: { color: '#e5e7eb', height: '1px' }
},
payWithCard: {
text: { color: '#9ca3af', fontSize: '12px' },
divider: { color: '#e5e7eb', height: '1px' }
},
savedPaymentMethods: {
text: { color: '#9ca3af', fontSize: '12px' },
divider: { color: '#e5e7eb', height: '1px' }
},
showOtherWaysToPay: {
text: { color: '#9ca3af', fontSize: '12px' },
divider: { color: '#e5e7eb', height: '1px' }
}
}
}Next steps
- Card form: Style card input fields, labels, and submit buttons.
- Saved payment methods: Style saved card rows and the CVV re-entry field.
- Style object reference: Full list of every accepted key and CSS property.