Paddle.js Methods

When you import Paddle.js on your page, you immediately have available to you the Paddle object, which provides the following methods:

MethodDetails
Paddle.Environment.set('sandbox')Set to use the sandbox environment; remove when you're ready to go live.
Paddle.Audience.AllowPopup()Returns true/false if the browser allows Paddle popups
Paddle.Audience.LogPopup()Set a cookie to prevent Paddle audience popups for 6 days
Paddle.Audience.Popup(*attributes*)Show popup to collect email for marketing (details)
Paddle.Audience.addUserToAudience(*userAttr*, *callback*)Adds a user to your audience list directly, only required field is userAttr.email
Paddle.Audience.subscribe(*email, consent, callback*)Add someone to your marketing list (details)
Paddle.Checkout.open(*options*)The main Paddle function to open the checkout. See checkout options for checkout options.
Paddle.Download.GetURLFromID(*product_id*)Get download URL for product_id from Paddle
Paddle.Download.Start(*url, product_id*)Start the download of a product at a certain URL
Paddle.Order.DetailsPopup(*checkout_id*, *processingMessage*)Show a modal popup with details of their recent purchase, often used in options.successCallback of Paddle.Checkout.open (details)
Paddle.Order.details(*checkout_id, callback, showLoader*)Returns an order details object, different from above in that it does not open a modal, just provides info (details)
Paddle.Product.Price(*amountType, product_id, quantity, callback*)Returns a specific localized pricing data for product_id. amountType can be gross, tax, net, or tax_included amount.
Paddle.Product.Prices(*product_id, quantity, callback*)Returns object of localized pricing data for product_id (details)
Paddle.Setup(*options*)Initialize Paddle on your page. The main options are Paddle.Setup({vendor: 12345, eventCallback: myCallback}) (details)
Paddle.Spinner.hide()Hide the Paddle loading spinner - can be used outside of Paddle checkout
Paddle.Spinner.show()Show the Paddle loading spinner - can be used outside of Paddle checkout
Paddle.Status.libraryVersionProvides your Paddle.js version, if using CDN will be most recent
Paddle.User.History(*email, product_id, callback*)Send an email of historical transactions to user owning the email passed in; can restrict to only certain products (details)