For AI agents and LLMs: a structured documentation index is available at /llms.txt. Every page has a Markdown sibling — append .md to any URL.

Skip to content
Docs

Pass a transaction to a checkout

Pass an existing transaction to Paddle.js to open a checkout to collect for it. You can do this for automatically and manually-collected transactions.

AI summary

Pass an existing Paddle transaction ID to Paddle.Checkout.open() to open a checkout that collects payment for that specific transaction, including pre-built invoices or subscription update flows.

  • • Pass transactionId to Paddle.Checkout.open() instead of items to collect payment for a server-side transaction — useful for invoices and payment updates.
  • • When passing a transactionId, Paddle uses the customer, items, and pricing from the existing transaction — you cannot change items on the checkout at this point.
  • • Billed transactions (status: billed) can be passed to checkout to let customers pay an issued invoice by card or other payment method, alongside bank transfer.

Transactions hold all the information about a customer purchase, including customer details, items, calculated tax and localized pricing, and payments.

Paddle creates transactions automatically when checkouts are opened, but you can also create your own transactions and pass them to a checkout.

How it works

All purchases are transactions. You can work with transactions using Paddle.js in two ways:

Pass items

When you open a checkout, Paddle.js automatically creates a transaction for you.

  1. Pass items to Paddle.js using HTML data attributes or Paddle.Checkout.open().
  2. Paddle.js automatically creates a transaction for the items passed.
  3. Customers pay using Paddle Checkout.

This is a typical self-service workflow, where customers sign up and pay using your website.

Pass transactions

You can also create a transaction manually using the API, then pass this to Paddle.js.

  1. You create a transaction using the API or the Paddle dashboard.
  2. Pass transaction to Paddle.js using HTML data attributes or Paddle.Checkout.open().
  3. Customers pay using Paddle Checkout.

This is more typical when working with sales-assisted customers who want to pay an invoice by card.

Learn more: Create a transaction

You can pass automatically-collected transactions and manually-collected transactions where billing_details.enable_checkout is true to a checkout.

Before you begin

The simplest way to pass a transaction to a checkout is to use a checkout payment link.

Automatically-collected transactions, and manually-collected transactions where billing_details.enable_checkout is true, include a checkout.url. This is made up of your default payment link, with a _ptxn query parameter and the transaction ID appended.

Provided your default checkout link page includes Paddle.js, it automatically opens a checkout for the transaction passed in the URL. The opened checkout inherits settings from checkout.settings in Paddle.Initialize().

You can:

Pass a transaction to Paddle.js

When building pages with Paddle.js, you can pass a transaction ID to a checkout using HTML data attributes or when you call Paddle.Checkout.open().

You should do this instead of passing an array of items.

Pass transactionId to the Paddle.Checkout.open() method to open a checkout for the passed transaction.

JavaScript
Paddle.Checkout.open({
settings: {
theme: "light",
locale: "en"
},
transactionId: "txn_01h0j589qt1nee24210teqtz57"
});

Add data-transaction-id as an attribute to your checkout launcher to open a checkout for the passed transaction.

HTML
<a href="#"
class="paddle_button"
data-display-mode="overlay"
data-theme="light"
data-locale="en"
data-transaction-id="txn_01h0j589qt1nee24210teqtz57"
>
Buy now
</a>

Was this page helpful?