Use Paddle.Checkout.open() to open a checkout.
- Set the initial items list or transaction that this checkout is for
- Set checkout settings, like the theme
- Prefill checkout properties, like customer email and country
- Send custom data to Paddle
To add items to a checkout, you can pass either:
- An
itemsarray of objects, where each object contains apriceIdandquantityproperty.priceIdshould be a Paddle ID of a price entity. - The Paddle ID of a transaction entity that you prepared earlier.
Recurring items on a checkout must have the same billing interval. For example, you can't have a checkout with some prices that are billed monthly and some products that are billed annually.
To speed up checkout, or build workflows for logged-in customers, you can prefill customer, address, and business information. You can do this by passing customer, address, and business data, or by passing Paddle IDs for an existing customer, address, or business.
You can open a checkout for an upsell by passing an upsell object, containing the Paddle ID of the previously completed transaction that this upsell follows.
You can use the Paddle.Initialize() method to set default checkout settings. These settings apply to all checkouts opened on a page.
Parameters
truetruetrue.alipayAlipay, popular in China.apple_payApple Pay on a supported Apple device.bancontactBancontact, popular in Belgium.blikBLIK, a popular payment method in Poland.cardCredit or debit card.
+ Show all values− Hide values
google_payGoogle Pay on a supported Android device, Chromebook, or Google Chrome browser.idealiDEAL, popular in the Netherlands.kakao_payKakao Pay, a popular payment method in Korea.mb_wayMB WAY, a popular payment method in Portugal.naver_payNaver Pay, a popular payment method in Korea.paycoPayco, a popular payment method in Korea.paypalPayPal.pixPix, popular in Brazil. Available in early access.samsung_paySamsung Pay, a popular payment method in Korea.saved_payment_methodsA customer's existing saved payment methods. RequirescustomerAuthTokento be passed toPaddle.Checkout.open().south_korea_local_cardKorean local credit or debit card.upiUnified Payments Interface (UPI), popular in India. Available in early access.
overlayinlineInline checkout mode. Checkout embedded as a frame in the page. Requiressettings.frameTargetinPaddle.Initialize().overlayOverlay checkout mode. Checkout opens in an overlay.
450Height in pixels of the <div> on load. Do not include px. Recommended 450.
The inline checkout footer includes a message to let customers know that Paddle is the merchant of record for the transaction. For compliance, the inline checkout frame must be sized so that the footer message is visible.
min-width: 286px;background-color:transparent;<div>. min-width must be set to 286px or above with checkout padding off; 312px with checkout padding on. Use frameInitialHeight to set height.checkout-container<div> element where the checkout should be rendered.(browser default)arArabic (العربية)zh-HansChinese (Simplified) (简化字)zh-TWChinese (Traditional) (正體字)daDanish (Dansk)nlDutch (Nederlands)
+ Show all values− Hide values
enEnglishfrFrench (Français)deGerman (Deutsch)itItalian (Italiano)jaJapanese (日本語)koKorean (한국어)noNorwegian (Norsk)plPolish (Polski)ptPortuguese (Português)pt-BRPortuguese (Brazilian) (Português do Brasil)trTurkish (Türkçe)ruRussian (Русский)esSpanish (Español)svSwedish (Svenska)
truetrue.truetrue.http:// or https://.lightlightLight-themed checkout.darkDark-themed checkout.
multi-pagemulti-page.one-pageOne-page checkout experience. Customer information and payment details collected on the same page.multi-pageMulti-page checkout experience. Customer information and payment details collected on separate pages.
updateItems() or updateCheckout() method to update the items list.pri_01gm81eqze2vmmvhpjg13bfeqg1txn_01gp3z8cfkqgdq07hcr3ja0q95items array to create a checkout for a transaction you previously created.pca_01hstrngzv6v4ard25jgvywwqq_01hsgrwf0ev6gxm74bp0gebxas_o7scuiadqtvbtspkmbwfnyrvyrq3zig6id, or the other fields.ctm_01gm82kny0ad1tk358gxmsq87memail.id.id, or the other fields.add_01gm82v81g69n9hdb0v9sw6j40USid.10021id.Californiabusiness is passed. You can't use if you're passing id.Newport Beachbusiness is passed. You can't use if you're passing id.Balboa Centerbusiness is passed. You can't use if you're passing id.id, or the other fields.biz_01gnymqsj1etmestb4yhemdavmname or taxIdentifier. Requires address.Paddle.com Incid.GB08172165id. Requires address.BF20OFFdiscountCode or discountId.dsc_01gtf15svsqzgp9325ss4ebmwtdiscountCode or discountId.txn_01gp3z8cfkqgdq07hcr3ja0q95txn_.true.{ "crm_user_id": "123" }customerAuthToken.Example
You can pass checkout settings using Paddle.Initialize(), or set them for each checkout in Paddle.Checkout.open().
This example includes the settings object as part of the checkout open method. Checkout is opened with these settings.
var itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, }, { priceId: "pri_01gm82kny0ad1tk358gxmsq87m", quantity: 1, },];
Paddle.Checkout.open({ settings: { displayMode: "overlay", theme: "light", locale: "en", }, items: itemsList,});import { initializePaddle } from "@paddle/paddle-js";
const paddle = await initializePaddle({ token: "live_7d279f61a3499fed520f7cd8c08",});
const itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, }, { priceId: "pri_01gm82kny0ad1tk358gxmsq87m", quantity: 1, },];
paddle?.Checkout.open({ settings: { displayMode: "overlay", theme: "light", locale: "en", }, items: itemsList,});To learn more, see Pass checkout settings
You can pass checkout settings using Paddle.Initialize(), or set them for each checkout in Paddle.Checkout.open().
This example includes the settings object as part of the checkout open method, passing the required settings to open a one-page overlay checkout.
var itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, }, { priceId: "pri_01gm82kny0ad1tk358gxmsq87m", quantity: 1, },];
Paddle.Checkout.open({ settings: { displayMode: "overlay", variant: "one-page", }, items: itemsList,});import { initializePaddle } from "@paddle/paddle-js";
const paddle = await initializePaddle({ token: "live_7d279f61a3499fed520f7cd8c08",});
const itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, }, { priceId: "pri_01gm82kny0ad1tk358gxmsq87m", quantity: 1, },];
paddle?.Checkout.open({ settings: { displayMode: "overlay", variant: "one-page", }, items: itemsList,});You can prefill checkout properties to speed up checkout.
This example includes customer, address, and business objects. Checkout is opened with this information prefilled, so customers land on the payment screen.
There's no settings object, so checkout settings must be included in Paddle.Initialize().
var itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, }, { priceId: "pri_01gm82kny0ad1tk358gxmsq87m", quantity: 1, },];
Paddle.Checkout.open({ items: itemsList, customer: { email: "jo@example.com", address: { countryCode: "US", postalCode: "10021", region: "New York", city: "New York", firstLine: "4050 Jefferson Plaza, 41st Floor", }, business: { name: "ChatApp Inc.", taxIdentifier: "555952383", }, },});import { initializePaddle } from "@paddle/paddle-js";
const paddle = await initializePaddle({ token: "live_7d279f61a3499fed520f7cd8c08",});
const itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, }, { priceId: "pri_01gm82kny0ad1tk358gxmsq87m", quantity: 1, },];
paddle?.Checkout.open({ items: itemsList, customer: { email: "jo@example.com", address: { countryCode: "US", postalCode: "10021", region: "New York", city: "New York", firstLine: "4050 Jefferson Plaza, 41st Floor", }, business: { name: "ChatApp Inc.", taxIdentifier: "555952383", }, },});To learn more, see Prefill checkout properties
You can pass Paddle IDs for customers, addresses, and businesses to build upgrade workflows for logged-in customers.
This example includes a customer ID, address ID, and business ID. Checkout is opened with this information prefilled, so customers land on the payment screen.
allowLogout is false in the settings object, hiding the option to change the customer on the opened checkout.
var itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, }, { priceId: "pri_01gm82kny0ad1tk358gxmsq87m", quantity: 1, },];
Paddle.Checkout.open({ settings: { displayMode: "overlay", theme: "light", locale: "en", allowLogout: false, }, items: itemsList, customer: { id: "ctm_01gm82kny0ad1tk358gxmsq87m", address: { id: "add_01gm82v81g69n9hdb0v9sw6j40", }, business: { id: "biz_01gnymqsj1etmestb4yhemdavm", }, },});import { initializePaddle } from "@paddle/paddle-js";
const paddle = await initializePaddle({ token: "live_7d279f61a3499fed520f7cd8c08",});
const itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, }, { priceId: "pri_01gm82kny0ad1tk358gxmsq87m", quantity: 1, },];
paddle?.Checkout.open({ settings: { displayMode: "overlay", theme: "light", locale: "en", allowLogout: false, }, items: itemsList, customer: { id: "ctm_01gm82kny0ad1tk358gxmsq87m", address: { id: "add_01gm82v81g69n9hdb0v9sw6j40", }, business: { id: "biz_01gnymqsj1etmestb4yhemdavm", }, },});To learn more, see Prefill checkout properties
You can create a transaction using the API or the Paddle dashboard, then pass it to a checkout to collect for it.
This example passes transactionID to open a checkout for that transaction.
There's no settings object, so checkout settings must be included in Paddle.Initialize().
Paddle.Checkout.open({ transactionId: "txn_01gp3z8cfkqgdq07hcr3ja0q95",});import { initializePaddle } from "@paddle/paddle-js";
const paddle = await initializePaddle({ token: "live_7d279f61a3499fed520f7cd8c08",});
paddle?.Checkout.open({ transactionId: "txn_01gp3z8cfkqgdq07hcr3ja0q95",});To learn more, see Pass a transaction to a checkout
Customers can save payment methods when buying items using Paddle Checkout. You can then present customers with their saved payment methods when making purchases in the future.
You must pass customerAuthToken when opening a checkout to authenticate a customer and present them with their saved payment methods. You can generate an authentication token for a customer using the API.
This example passes customerAuthToken to Paddle.Checkout.open(), so customers are presented with their saved payment methods.
var itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, },];
Paddle.Checkout.open({ items: itemsList, customerAuthToken: "pca_01hwz42rfyaxw721bgkppp66gx_01h282ye3v2d9cmcm8dzpawrd0_otkqbvati3ryh2f6o7zdr6owjsdhkgmm", settings: { displayMode: "inline", frameTarget: "checkout-container", frameInitialHeight: "450", frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;", },});import { initializePaddle } from "@paddle/paddle-js";
const paddle = await initializePaddle({ token: "live_7d279f61a3499fed520f7cd8c08",});
const itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, },];
paddle?.Checkout.open({ items: itemsList, customerAuthToken: "pca_01hwz42rfyaxw721bgkppp66gx_01h282ye3v2d9cmcm8dzpawrd0_otkqbvati3ryh2f6o7zdr6owjsdhkgmm", settings: { displayMode: "inline", frameTarget: "checkout-container", frameInitialHeight: 450, frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;", },});To learn more, see Present saved payment methods at checkout
Customers can save payment methods when buying items using Paddle Checkout. You can then present customers with their saved payment methods when making purchases in the future.
You must pass customerAuthToken when opening a checkout to authenticate a customer and present them with their saved payment methods. You can generate an authentication token for a customer using the API.
You can open a checkout for a specific a payment method that a customer has saved by using savedPaymentMethodId, passing the Paddle ID for a saved payment method. You can list payment methods for a customer using the API.
This example passes customerAuthToken and savedPaymentMethodId to Paddle.Checkout.open(), so customers are presented with the passed saved payment method.
var itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, },];
Paddle.Checkout.open({ customerAuthToken: "pca_01hwz42rfyaxw721bgkppp66gx_01h282ye3v2d9cmcm8dzpawrd0_otkqbvati3ryh2f6o7zdr6owjsdhkgmm", savedPaymentMethodId: "paymtd_01hs8zx6x377xfsfrt2bqsevbw", settings: { displayMode: "inline", frameTarget: "checkout-container", frameInitialHeight: "450", frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;", items: itemsList, },});import { initializePaddle } from "@paddle/paddle-js";
const paddle = await initializePaddle({ token: "live_7d279f61a3499fed520f7cd8c08",});
const itemsList = [ { priceId: "pri_01gm81eqze2vmmvhpjg13bfeqg", quantity: 1, },];
paddle?.Checkout.open({ items: itemsList, customerAuthToken: "pca_01hwz42rfyaxw721bgkppp66gx_01h282ye3v2d9cmcm8dzpawrd0_otkqbvati3ryh2f6o7zdr6owjsdhkgmm", savedPaymentMethodId: "paymtd_01hs8zx6x377xfsfrt2bqsevbw", settings: { displayMode: "inline", frameTarget: "checkout-container", frameInitialHeight: 450, frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;", },});To learn more, see Present saved payment methods at checkout
Upsell checkout is in early access
Access to Upsell checkout is limited to users who are part of our early access program. If you're interested in joining the program, review this guide and email us at sellers@paddle.com to apply. We'll reach out when space is available if you meet the program requirements.
You can present customers with a streamlined purchase flow for upsells at checkout to encourage them to upgrade or purchase additional items if they've previously completed a transaction.
This example passes the previously completed transaction ID as upsell.transactionId, and passes upsell.settings.showSkipButton: false to hide the "No thanks" skip button at checkout.
var upsellItems = [ { priceId: "pri_01h1vjfevh5etwq3rb176h9d9w", quantity: 1, },];
// previousTransactionId was captured from the initial checkout.completed eventPaddle.Checkout.open({ items: upsellItems, customerAuthToken: "pca_01hwz42rfyaxw721bgkppp66gx_01h282ye3v2d9cmcm8dzpawrd0_otkqbvati3ryh2f6o7zdr6owjsdhkgmm", settings: { displayMode: "inline", frameTarget: "checkout-container", frameInitialHeight: "450", frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;", }, upsell: { transactionId: previousTransactionId, settings: { showSkipButton: false, }, },});import { initializePaddle } from "@paddle/paddle-js";
const paddle = await initializePaddle({ token: "live_7d279f61a3499fed520f7cd8c08",});
const upsellItems = [ { priceId: "pri_01h1vjfevh5etwq3rb176h9d9w", quantity: 1, },];
// previousTransactionId was captured from the initial checkout.completed eventpaddle?.Checkout.open({ items: upsellItems, customerAuthToken: "pca_01hwz42rfyaxw721bgkppp66gx_01h282ye3v2d9cmcm8dzpawrd0_otkqbvati3ryh2f6o7zdr6owjsdhkgmm", settings: { displayMode: "inline", frameTarget: "checkout-container", frameInitialHeight: 450, frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;", }, upsell: { transactionId: previousTransactionId, settings: { showSkipButton: false, }, },});To learn more, see Open a checkout for an upsell
Events
checkout.loaded | Emitted when a checkout is created and loaded on the page. |
checkout.customer.created | Emitted when a customer is created as part of checkout. |