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:

Method Details
Paddle.Setup(*options*) Initialize Paddle on your page. The main options are Paddle.Setup({vendor: 12345, eventCallback: myCallback})
Paddle.Checkout.open(*options*) The main Paddle function to open the checkout. See checkout options for checkout options.
Paddle.Audience.Popup(*attributes*) Show popup to collect email for marketing (details)
Paddle.Audience.subscribe(*email, consent, callback*) Add someone to your marketing list (details)
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.addUserToAudience(*userAttr*, *callback*) Adds a user to your audience list directly, only required field is userAttr.email
Paddle.Spinner.show() Show the Paddle loading spinner, can be used outside of Paddle checkout
Paddle.Spinner.hide() Hide the Paddle loading spinner
Paddle.Options.(*options*) Can set options of Paddle.js, most useful Paddle.Options({debug:true})
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
Paddle.Status.libraryVersion Provides your Paddle.js version, if using CDN will be most recent
Paddle.Product.Prices(*product_id, quantity, callback*) Returns object of localized pricing data for product_id, examples here
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 (example)
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 (example)