Skip to main content
Primer Checkout uses platform-specific configuration to control checkout behavior, appearance, and payment handling.
Primer Checkout Web uses two types of configuration: component properties (HTML attributes) and SDK options (JavaScript object).

Configuration Overview

Don’t mix them up. Component properties must use setAttribute(). SDK options must be assigned directly to .options.

Component Properties / Client Token

The client token authenticates your checkout session. Obtain this by creating a client session.

client-token (required)

custom-styles

JSON string containing CSS variables for theming.
See Styling Guide for available properties.

loader-disabled

Disables the default loading spinner.

SDK Options / Settings

SDK options configure checkout behavior. Assign a JavaScript object directly to the options property.
For the complete list of available options, see the SDK Options Reference.

Common Patterns

Set Locale

Supported locales

Enable Specific Payment Methods

Pre-fill Cardholder Name

For runtime updates after initialization, use primer.setCardholderName() instead.

Enable Vault (Saved Payment Methods)

Configure Apple Pay Button

Configure Google Pay Button

Configure Klarna

Configure Klarna via Adyen


Complete Example


Framework-Specific Patterns


Advanced Configuration

Build custom vault UIs while retaining full vault functionality. Enable headless mode:
Then use onVaultedMethodsUpdate, vault.createCvvInput(), and vault.startPayment() to build your custom UI.
Headless Vault Implementation Guide
Use your own submit button instead of the built-in one:
External Submit Button Recipe
Display the payment amount on the submit button:

See also

Web SDK Options Reference

Complete list of all available Web options

Android SDK Reference

Android SDK API documentation

Events Guide

Handle payment success, failure, and state changes

Styling

Customize colors, fonts, and spacing