Set your default payment link
Your default payment link is a quick way to open Paddle Checkout for a transaction, and used when updating a payment method. Set it in the Paddle dashboard.
Transactions have a checkout payment link that you can use to open a checkout to collect for payment. Set a default payment link to tell Paddle which page in your app or website that checkout payment links should point to by default.
Your default payment link is also used to open a checkout to let sellers update their payment method. It's included automatically in emails sent by Paddle to customers.
You must set your default payment link to start selling with Paddle. You can't create transactions without it — including manually-collected transactions (invoices).
How it works
Every Paddle account has a default payment link. It's used for:
- Unique payment links against transactions that automatically open a Paddle Checkout to collect for payment.
- As a redirect for the payment method update URL against automatically-collected subscriptions to let customers update payment details.
- In emails sent by Paddle to customers to let them update their payment details for automatically-collected subscriptions.
Your default payment link should be a page for an approved website that includes Paddle.js. You don't need to do anything to get Paddle.js to open a checkout, it automatically opens a checkout for the transaction when the query parameter is present.
Transaction payment links
All automatically-collected transactions include a checkout payment link.
Manually-collected transactions don't include a checkout payment link by default, but you can set billing_details.enable_checkout
to true
when creating or updating to include one. When enabled, this link is automatically included on invoice documents sent by Paddle.
Checkout payment links are returned in transaction responses as checkout.url
. They're made up of your default payment link with a _ptxn
query parameter appended. The value of the query parameter is the transaction ID. For example:
11https://aeroedit.com/pay?_ptxn=txn_01h2b0qpjc0xt8k5aw6nsdec4p
In this example:
Default payment link | https://aeroedit.com/pay |
Query parameter key | ?_ptxn= |
Query parameter value (transaction ID) | txn_01h2b0qpjc0xt8k5aw6nsdec4p |
You can pass any of your other approved websites as checkout.url
when creating or updating a transaction to override the default checkout link, if you want to point to another page.
Payment method update links
For compliance, subscription emails from Paddle include a link to let customers update their payment method and cancel their subscription. Links are also returned when working with subscription entities against subscription.management_urls
.
The link to update a payment method redirects to your default payment URL to open a checkout to update a payment method.
Before you begin
Get your website approved
Add the website where your default payment link page is hosted to Paddle > Checkout > Website approval.
If you're using a sandbox account, your website is automatically approved right away. You should see a check mark.
For live accounts, website approval may take a few days as the Paddle seller verification team check your website to make sure you're able to sell with Paddle. See: Website verification FAQs
Build your default payment link page
Your default payment link should be a page for an approved website that includes Paddle.js. It might be your checkout page, or you might create a separate page specifically for it.
If your page calls
Paddle.Checkout.open()
on load with a list ofitems
or atransactionId
, this takes priority over the query parameter.
By default, Paddle.js opens an overlay checkout for the passed transaction. You can set default checkout settings by passing them to Paddle.Initialize()
. Paddle.js uses default settings when opening a checkout payment link.
This example sets default checkout settings for all checkouts opened on a page. When using a checkout payment link, Paddle.js opens an inline checkout with these settings.
123456789101112131Paddle.Initialize({
2 token: 'live_7d279f61a3499fed520f7cd8c08', // replace with a client-side token
3 checkout: {
4 settings: {
5 displayMode: "inline",
6 theme: "light",
7 locale: "en",
8 frameTarget: "checkout-container",
9 frameInitialHeight: "450",
10 frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;"
11 }
12 }
13});
This example sets default checkout settings for all checkouts opened on a page. When using a checkout payment link, Paddle.js opens an overlay checkout with these settings.
Paddle.js opens an overlay checkout by default, but this is a good way to pass additional settings like locale
and theme
.
123456789101Paddle.Initialize({
2 token: 'live_7d279f61a3499fed520f7cd8c08', // replace with a client-side token
3 checkout: {
4 settings: {
5 displayMode: "overlay",
6 theme: "light",
7 locale: "en"
8 }
9 }
10});
Grab the code from the overlay checkout tutorial to demo how opening a checkout using your default payment link works
Copy this example into an editor, then replace the client-side token with a token from your system. Save and open in your browser, then append a _ptxn
query parameter with the value of a transaction ID to the URL to check that Paddle correctly opens a checkout for the transaction.
12345678910111213141516171819201<!DOCTYPE html>
2<html lang="en" color-mode="user">
3<head>
4 <title>Overlay checkout demo</title>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script>
8 <style>
9 .page-container {
10 max-width: 900px;
11 margin: auto;
12 text-align: center;
13 margin-top: 2em;
14 padding-left: 1em;
15 padding-right: 1em;
16 }
17 .grid {
18 display: block;
19 margin-bottom: 1em;
20 }
Note that this page doesn't call Paddle.Checkout.open()
on load. If you call Paddle.Checkout.open()
with items or another transaction ID, this takes priority over the checkout payment link query parameter.
Use the overlay checkout demo on CodePen to test right away. Replace the client-side token with one from your system, then add
?_ptxn=
and the ID of a transaction from your Paddle system to the CodePen URL to preview.
Set your default payment link
You can set your default payment link in the Paddle dashboard. You must set a default payment link — even if you only sell by invoice or only sell one-time products.
Your sandbox and live systems are separate. You should set a default payment link for both systems. They don't have to be the same.
Go to Paddle > Checkout > Checkout Settings.
Add your default payment link under the "Default payment link" heading. This should be a complete link, like
https://aeroedit.com/pay
. You can uselocalhost
if you're testing locally on sandbox, then change it later.Click Save changes when you're done.