Checkout Parameters

Passing additional parameters allows you to modify the behavior of the Paddle checkout, for example to pre-fill a buyer’s email address or set a custom message. Either JavaScript parameters or HTML attributes can be used, depending on your integration.

How to pass in parameters

The method of specifying checkout parameters depends on whether you have implemented your checkout using the paddle_button class or are invoking the checkout yourself by calling the Paddle.Checkout.open() method.

If you are using the paddle_button class, checkout properties must be set using data attributes on the button itself (see the HTML Attributes tab in the table below). If you are calling Paddle.Checkout.open(), the properties should be set by specifying parameters in the method call (see JavaScript Attribute column below).

See below for a simple example showing how to pass in a user email to the checkout.

Paddle.Checkout.open({
      product: 12345,
      email: "name@example.com"
});

Checkout Properties

A full list of checkout properties is shown below for use either on checkout buttons, or with the Checkout.open() method.

product
integer or string

The ID of the Paddle Product, Subscription or Bundle this checkout is for.

title
string

Override the product’s name on the checkout page.

message
string

A message/string of text displayed under the product name on the checkout.

coupon
string

Pre-fill a coupon code on the checkout.

email
string

Pre-fill the customer email field on the checkout.

format: email
marketingConsent
string

Pass on consent to send marketing emails to users.

Allowed Values: 0, 1
country
string

Pre-fill the customer country field on the checkout. See supported countries.

pattern: [A-Z]{2}
example: US
postcode
string

Pre-fills the customer ‘ZIP/Postcode’ field on the checkout. See countries requiring postcode.

Note: country is also required for postcode to be pre-filled.

allowQuantity
string or boolean

Enable the quantity selector on the checkout page.

Allowed Values: true, false
default: true
quantity
string or integer

Pre-fill the quantity selector on the checkout. Please note that free products/subscription plans are fixed to a quantity of 1.

disableLogout
string or boolean

Disable the ability for a user to logout/change email once on the checkout.

Allowed Values: true, false
default: false
locale
string

Force the checkout to a specific locale. See Supported Locales.

passthrough
string

A string of metadata you wish to store with the checkout. Will be sent alongside all webhooks associated with the order. See the Paddle Checkout (Web) documentation for more information.

referring_domain
string

Add a custom referrer/campaign string to be stored with the checkout.

success
string

A URL to redirect to upon checkout completion.

successCallback
string

The name of a Javascript function to call upon checkout completion.

closeCallback
string

The name of a Javascript function to call on checkout close.

loadCallback
string

The name of a Javascript function to call upon checkout load.

upsell
string or integer

The ID of a product you wish to prompt the user to purchase instead.

upsellTitle
string

Customise the title of the upsell dialog.

upsellText
string

Customise the upsell message displayed to the user.

upsellAction
string

Customise the upsell button text.

upsellCoupon
string

Pre-fill a coupon code for the upsell product.

override
string

Open the checkout with a custom pay link, cancel URL or payment method update.

format: uri