For AI agents and LLMs: a structured documentation index is available at /llms.txt. Every page has a Markdown sibling — append .md to any URL. To search these docs, send a GET request to https://paddle-docs-retrieval.kapa-paddle.workers.dev/?q=<question> with a URL-encoded question. No authentication needed.

Skip to content
Paddle Docs home

Pass checkout settings

Pass settings to Paddle.js to determine how opened checkouts should work. Set default settings for all checkouts on a page to save time.

AI summary

Pass checkout settings to Paddle.js to control how opened checkouts behave, either globally for every checkout on a page or individually for each checkout.

  • •Set defaults once with Paddle.Initialize() using checkout.settings when several checkouts on a page share the same settings, rather than repeating them per checkout.
  • •Use Paddle.Checkout.open() settings or HTML data attributes on the launcher for per-checkout settings; data attributes are generally recommended for overlay checkouts or limited CMS setups.
  • •Inline checkouts require displayMode, frameTarget, frameStyle, and frameInitialHeight; frameStyle should set min-width to 286px or more with padding off, or 312px with padding on.

As well as passing items to a checkout, you can pass settings that tell Paddle.js how a checkout should work.

If you offer multiple products or plans, you might have more than one checkout button on a page. To save time, you can pass default settings that apply to all checkouts opened when including Paddle.js.

How it works

You can pass settings to Paddle.js to determine how opened checkouts should work. You can do this in three ways:

  • Pass data attributes to button that opens checkout.
    Use HTML data attributes on your checkout launcher element. The settings you pass apply only to the opened checkout.
  • Apply settings to only the opened checkout.
    Pass settings to Paddle.Checkout.open(). The settings you pass apply only to the opened checkout.
  • Apply settings to all checkouts opened on a page.
    Pass checkout.settings to Paddle.Initialize(). The settings you pass apply to all checkouts.

If you have more than one checkout link on a page and all the checkouts you use have the same settings, we recommend using the Paddle.Initialize() method. This sets default settings that apply to all checkouts opened on the page, meaning you don't need to pass the same settings for each checkout.

Use Paddle.Checkout.open() or HTML data attributes to pass settings for each checkout on a page. HTML data attributes are generally recommended for overlay checkouts, or when working with a CMS that has limited customization options.

Before you begin

To get a step-by-step overview of how to build a complete checkout, including passing checkout settings and prefilling properties, see Build an overlay checkout or build an inline checkout

Required settings

If you're building an inline checkout, some settings are required:

displayModestring|null
Default: overlay

Display mode for the checkout.

frameTargetstring|null

Class name of the element where the checkout should be rendered.

frameStylestring|null

Styles to apply to the checkout element. min-width must be set to 286px or more with checkout padding off, 312px with checkout padding on.

frameInitialHeightstring|null

Height in pixels of the <div> on load. Don't include px. Recommended 450.

frameStyle isn't required, but strongly recommended for styling the inline checkout frame. If not set, checkout frames inherit browser or default styles for iframe elements.

One-page checkout

By default, Paddle presents customers with a multi-page checkout experience. You can present customers with a one-page experience to collect customer information and payment details on the same page.

Use variant to present one-page or multi-page checkout experiences. Paddle Checkout defaults to multi-page by default.

variantstring|null
Default: multi-page

Checkout experience presented to customers.

Light and dark mode

Use theme to open a checkout in light or dark mode. Paddle Checkout opens in light mode by default.

For inline checkout and hosted checkouts, theme sets which of your light or dark mode styles Paddle uses. Match it to your app's color scheme so checkout fits with the rest of your page.

themestring|null
Default: light

Mode that checkout opens in. For inline checkout and hosted checkouts, Paddle uses the light or dark mode styles you set for your account.

Allow logout

If you're presenting an existing customer with options to upgrade, set allowLogout to false. This hides the option to change the customer on an opened checkout.

allowLogoutboolean|null
Default: true

Whether the user can change their email once on the checkout.

When you pass a customerAuthToken to Paddle.js to authenticate a customer, or you pass an upsell object to Paddle.js to show an upsell flow, allowLogout is ignored and set to false.

Locale

Paddle Checkout uses the browser default locale if locale isn't passed. If you have a language selector on your website or app, we recommend passing the chosen locale to opened checkout so that it matches.

localestring|null
Default: (browser default)

Language for the checkout. If omitted, the browser's default locale is used.

Hide option to add discount

Paddle Checkout includes an "Add discount" option to let customers enter a discount code. If you don't offer discounts, you might like to hide this option.

showAddDiscountsboolean|null
Default: true

Whether the option to add a discount is displayed at checkout. Requires the "Allow buyers to add a discount code" option turned on in Paddle > Checkout > Checkout configuration, or discounts_enabled set to true using /settings/checkout-features.

Hide option to add tax number

Paddle Checkout includes an "Add tax number" option to let customers enter a tax number and business information. If you don't work with businesses, you might like to hide this option.

showAddTaxIdboolean|null
Default: true

Whether the option to add a tax number is displayed at checkout.

Set default settings during initialization

Rather than passing checkout settings each time you create a link or call Paddle.Checkout.open, you can set default settings when you include Paddle.js. These settings apply to all checkouts opened on the page.

Use the Paddle.Initialize() method and pass your checkout defaults to checkout.settings. You can do this in the same block where you include Paddle.js on your page.

This example sets up an inline checkout, then sets the checkout theme to dark, locale to Spanish (es), and allowLogout to false:

HTML
<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script>
<script type="text/javascript">
Paddle.Initialize({
token: 'live_7d279f61a3499fed520f7cd8c08', // replace with a client-side token
pwCustomer: { },
checkout: {
settings: {
displayMode: "inline",
frameTarget: "checkout-container"
frameInitialHeight: "450",
frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;",
theme: "dark",
locale: "es",
allowLogout: false
}
}
});
</script>

To learn more, see Paddle.Initialize()

Pass settings for each checkout

You can pass settings for each checkout that you open on the page when you create a link or call Paddle.Checkout.open().

This example sets the checkout theme to dark, locale to Spanish (es), and allowLogout to false.

JavaScript
Paddle.Checkout.open({
settings: {
theme: "dark",
locale: "es",
allowLogout: false,
items: [
{
priceId: 'pri_01gs59hve0hrz6nyybj56z04eq',
quantity: 1
},
{
priceId: 'pri_01gs59p7rcxmzab2dm3gfqq00a',
quantity: 1
}
]
}
});

For a full list of parameters, see Paddle.Checkout.open()

This example sets the checkout data-theme to dark, data-locale to Spanish (es), and data-allow-logout to false.

Paddle Checkout launcher
<a
href='#'
class='paddle_button'
data-theme='dark'
data-locale='es'
data-allow-logout='false'
data-items='[
{
"priceId": "pri_01gs59hve0hrz6nyybj56z04eq",
"quantity": 1
},
{
"priceId": "pri_01gs59p7rcxmzab2dm3gfqq00a",
"quantity": 1
}
]'
>
Buy Now
</a>

For a full list of HTML data attributes, see HTML data attributes

Was this page helpful?