Skip to main content
This reference documents all options available in the options property of <primer-checkout>.
const checkout = document.querySelector('primer-checkout');

checkout.setAttribute('client-token', 'your-token'); // Component property
checkout.options = {                                  // SDK options
  locale: 'en-GB',
  card: {
    cardholderName: { required: true }
  }
};
Looking for how to use options? See the Options Guide for patterns and best practices.

Quick Navigation

CategoryOptions
Corelocale, merchantDomain, enabledPaymentMethods, disabledPayments
Cardcard.cardholderName.*
Apple PayapplePay.buttonOptions.*, applePay.billingOptions, applePay.shippingOptions, applePay.shippingOptions.requireShippingMethod
Google PaygooglePay.buttonType, googlePay.buttonColor, googlePay.captureShippingAddress, googlePay.requireShippingMethod
Klarnaklarna.paymentFlow, klarna.allowedPaymentCategories
Vaultvault.enabled, vault.headless, vault.showEmptyState
Submit ButtonsubmitButton.amountVisible, submitButton.useBuiltInButton
Stripestripe.mandateData, stripe.publishableKey
LegacysdkCore

Core Options

locale

PropertyTypeDefault
localestringBrowser’s locale
Sets the UI language. Uses standard locale formats.
checkout.options = {
  locale: 'en-GB'
};
Supported locales include: en-US, en-GB, fr-FR, de-DE, es-ES, it-IT, nl-NL, pt-BR, ja-JP, and 40+ more.

merchantDomain

PropertyTypeDefault
merchantDomainstringwindow.location.hostname
Domain for Apple Pay validation. Set this when checkout is hosted on a different domain than your registered Apple Pay domain.
checkout.options = {
  merchantDomain: 'merchant.example.com'
};

enabledPaymentMethods

PropertyTypeDefault
enabledPaymentMethodsPaymentMethodType[]All configured methods
Filters which payment methods are displayed. Methods must also be configured in your Primer Dashboard.
import { PaymentMethodType } from '@primer-io/primer-js';

checkout.options = {
  enabledPaymentMethods: [
    PaymentMethodType.PAYMENT_CARD,
    PaymentMethodType.PAYPAL,
    PaymentMethodType.ADYEN_BLIK,
  ]
};

disabledPayments

PropertyTypeDefault
disabledPaymentsbooleanfalse
Disables all payment methods. Useful when you only want to show vaulted payment methods.
checkout.options = {
  disabledPayments: true
};

Card Options

card.cardholderName

PropertyTypeDefault
card.cardholderName.requiredbooleanfalse
card.cardholderName.visiblebooleantrue
card.cardholderName.defaultValuestringnone
Configure the cardholder name field.
checkout.options = {
  card: {
    cardholderName: {
      required: true,
      visible: true,
      defaultValue: 'John Doe'  // Pre-fill the field
    }
  }
};
For runtime updates after initialization, use primer.setCardholderName().

Apple Pay Options

For complete Apple Pay configuration including all button types, testing, and requirements, see the Apple Pay Options Reference.

applePay.buttonOptions

PropertyTypeDefault
applePay.buttonOptions.typestring'plain'
applePay.buttonOptions.buttonStylestring
Button types: 'plain', 'buy', 'book', 'check-out', 'donate', 'order', 'pay', 'set-up', 'subscribe', and more Button styles: 'black', 'white', 'white-outline'. If not set, Apple Pay uses its default styling.

applePay.billingOptions

PropertyTypeDefault
applePay.billingOptions.requiredBillingContactFieldsstring[][]
Values: 'postalAddress'

applePay.shippingOptions

PropertyTypeDefault
applePay.shippingOptions.requiredShippingContactFieldsstring[][]
applePay.shippingOptions.requireShippingMethodbooleanfalse
Contact fields: 'postalAddress', 'name', 'phoneticName', 'phone', 'email'
checkout.options = {
  applePay: {
    buttonOptions: {
      type: 'buy',
      buttonStyle: 'black'
    },
    billingOptions: {
      requiredBillingContactFields: ['postalAddress']
    },
    shippingOptions: {
      requiredShippingContactFields: ['postalAddress', 'name', 'email'],
      requireShippingMethod: true
    }
  }
};

Google Pay Options

For complete Google Pay configuration including express checkout, shipping methods, and testing, see the Google Pay Options Reference.

googlePay.buttonType

PropertyTypeDefault
googlePay.buttonTypestring'buy'
Values: 'buy', 'checkout', 'pay', 'order', 'book', 'donate', 'subscribe', 'plain'

googlePay.buttonColor

PropertyTypeDefault
googlePay.buttonColorstring'black'
Values: 'black', 'white', 'default'

googlePay.buttonSizeMode

PropertyTypeDefault
googlePay.buttonSizeModestring'fill'
Values: 'fill' (expands to container), 'static' (sized by label)

googlePay.buttonRadius

PropertyTypeDefault
googlePay.buttonRadiusnumber
Corner radius in pixels.

googlePay.buttonLocale

PropertyTypeDefault
googlePay.buttonLocalestringBrowser default
ISO 639-1 locale code (e.g., 'en', 'de', 'fr').

googlePay.captureBillingAddress

PropertyTypeDefault
googlePay.captureBillingAddressbooleanfalse

googlePay.captureShippingAddress

PropertyTypeDefault
googlePay.captureShippingAddressbooleanfalse

googlePay.shippingAddressParameters

PropertyTypeDefault
googlePay.shippingAddressParameters.allowedCountryCodesstring[]
googlePay.shippingAddressParameters.phoneNumberRequiredbooleanfalse

googlePay.requireShippingMethod

PropertyTypeDefault
googlePay.requireShippingMethodbooleanfalse
Enable shipping method selection in the Google Pay sheet. Requires captureShippingAddress or shippingAddressParameters.

googlePay.emailRequired

PropertyTypeDefault
googlePay.emailRequiredbooleanfalse

googlePay.existingPaymentMethodRequired

PropertyTypeDefault
googlePay.existingPaymentMethodRequiredbooleanfalse
Only show button if user has a saved payment method (production only).
checkout.options = {
  googlePay: {
    buttonType: 'buy',
    buttonColor: 'black',
    buttonSizeMode: 'fill',
    captureBillingAddress: true,
    captureShippingAddress: true,
    requireShippingMethod: true,
    emailRequired: true
  }
};

Klarna Options

klarna.paymentFlow

PropertyTypeDefault
klarna.paymentFlowstring'DEFAULT'
Values: 'DEFAULT', 'PREFER_VAULT'

klarna.recurringPaymentDescription

PropertyTypeDefault
klarna.recurringPaymentDescriptionstringnone
Required when offering recurring payments.

klarna.allowedPaymentCategories

PropertyTypeDefault
klarna.allowedPaymentCategoriesstring[]All categories
Values: 'pay_now', 'pay_later', 'pay_over_time'

klarna.buttonOptions.text

PropertyTypeDefault
klarna.buttonOptions.textstringnone
Custom button text.
checkout.options = {
  klarna: {
    paymentFlow: 'DEFAULT',
    allowedPaymentCategories: ['pay_now', 'pay_later'],
    buttonOptions: {
      text: 'Pay with Klarna'
    }
  }
};

PayPal Options

PayPal has extensive configuration options documented separately. PayPal Options Reference

Vault Options

vault.enabled

PropertyTypeDefault
vault.enabledbooleanfalse
Enable payment method vaulting (saving for future use).
checkout.options = {
  vault: {
    enabled: true
  }
};

vault.headless

PropertyTypeDefault
vault.headlessbooleanfalse
Hides default vault UI for custom implementations. Use with onVaultedMethodsUpdate, vault.createCvvInput(), and vault.startPayment().
checkout.options = {
  vault: {
    enabled: true,
    headless: true
  }
};
Headless Vault Implementation Guide

vault.showEmptyState

PropertyTypeDefault
vault.showEmptyStatebooleanfalse
Show a message when no saved payment methods exist.

Submit Button Options

submitButton.amountVisible

PropertyTypeDefault
submitButton.amountVisiblebooleanfalse
Show the order amount on the button (e.g., “Pay $12.34”).

submitButton.useBuiltInButton

PropertyTypeDefault
submitButton.useBuiltInButtonbooleantrue
Set to false to use your own submit button. Dispatch primer:card-submit event to trigger submission.
// Use external button
checkout.options = {
  submitButton: {
    useBuiltInButton: false
  }
};

// Your button triggers submission
document.getElementById('my-button').addEventListener('click', () => {
  document.dispatchEvent(new CustomEvent('primer:card-submit', {
    bubbles: true,
    composed: true
  }));
});
External Submit Button Recipe

Stripe Options

stripe.publishableKey

PropertyTypeDefault
stripe.publishableKeystringnone
Stripe publishable key for direct integration.

stripe.mandateData

PropertyTypeDefault
stripe.mandateData.fullMandateTextstringnone
stripe.mandateData.merchantNamestringnone
Custom mandate text for direct debit payments.
checkout.options = {
  stripe: {
    publishableKey: 'pk_test_...',
    mandateData: {
      fullMandateText: 'By providing your payment information...',
      merchantName: 'Your Business'
    }
  }
};

Legacy Options

sdkCore

PropertyTypeDefault
sdkCorebooleantrue
SDK Core is the default payment engine. Set to false only if you need legacy behavior.
checkout.options = {
  sdkCore: false  // Use legacy SDK (not recommended)
};
Only set sdkCore: false if you have a specific need for legacy behavior. SDK Core is the recommended engine for all new integrations.

TypeScript

Import types for autocomplete and type checking:
import type { PrimerCheckoutOptions } from '@primer-io/primer-js';
import { PaymentMethodType } from '@primer-io/primer-js';

const options: PrimerCheckoutOptions = {
  locale: 'en-GB',
  enabledPaymentMethods: [PaymentMethodType.PAYMENT_CARD]
};

checkout.options = options;

See Also