Post-Checkout

Upon your checkout being completed successfully, or being closed/abandoned, you may wish to take additional actions, for example loading a Thank You page or showing a message to the user.

Paddle's checkout supports successCallback and closeCallback parameters, which specify JS functions that are fired upon the checkout completing a transaction or being closed, respectively.

You can specify an anonymous function or pass in the name of a explicitly defined function, for example:

preparing...

Success and Close Callbacks can also be specified on a Paddle purchase button with the equivalent HTML data attributes data-success-callback and data-close-callback. If setting callbacks with data attributes, you must specify an explicit JavaScript function name.

The Paddle Checkout has several options on what to do on a completed checkout, by default the checkout will show a ‘Success’ message indicating that the transaction was successful.

One option is to display a popup containing order, receipt and payment information as an alternate success screen.

You can enable the Checkout Complete Popup in the Setup() function of Paddle.js by setting completeDetails to true.

You may wish to display to the customer’s order, license or transaction information, on your Thank You page after a checkout completes.

Paddle.js provides the Paddle.Order.details method to pull the transaction data on checkout complete. You can also call the Order Details API directly.

The best way to use the method is to call it within the Paddle.js eventCallback. This allows you to create a process where the customer’s order information is immediately available to the customer once the checkout has completed.

For example, you can listen for a successful checkout using the event callback, retrieve the checkout ID and pass it into the Paddle.Order.details method:

preparing...

If you’re delivering a license key for a one-time product, the key will be inside a lockers object returned in the response.