Update custom data for an open checkout
Add or change custom data against a checkout that's already open by passing it to Paddle.js.
What's new?
We've added customData
as a supported parameter for the Paddle.Checkout.updateCheckout()
method in Paddle.js. You can use this to update custom data for an open checkout.
Your own structured key-value data to include with this checkout. Passed data is held against the related transaction. If a transaction is for recurring items, custom data is copied to the related subscription when created.
If custom data already exists, it's replaced. Must be valid JSON and contain at least one key.
How it works
You can use Paddle.Checkout.updateCheckout()
to dynamically update items, discount, and customer information for an open checkout.
With this update, you can now pass customData
when updating an open checkout. Custom data lets you add your own structured key-value data to entities across the API. It's great for storing information from your frontend implementation that you might want to use for analysis or as part of your integration.
As when passing custom data to Paddle.Checkout.open()
, the passed data is stored against the related transaction and copied to the related subscription when it's created. If the checkout already has custom data against it, it's overwritten.
Examples
This example passes customData
to Paddle.Checkout.updateCheckout()
.
If successful, custom data on the open checkout is updated.
123456781Paddle.Checkout.updateCheckout({
2 customData: {
3 "utm_medium": "social",
4 "utm_source": "linkedin",
5 "utm_content": "launch-video",
6 "integration_id": "AA-123"
7 }
8});
Summary of changes
Method | Change | Details |
---|---|---|
Paddle.Checkout.updateCheckout() | New parameter | customData is now supported. |
Next steps
This change is live in Paddle.js now, so you can start passing customData
to Paddle.Checkout.updateCheckout()
when you're ready.
You don't need to do anything to get the latest version of Paddle.js — we serve the latest version automatically.
If you've imported Paddle.js as a module using the Paddle.js wrapper, update to the latest version using your package manager to get the latest TypeScript definitions.