Paddle Billing
Search

Use customer portal links in your app

Add customer portal links to your app to hand off core billing workflows to Paddle, letting customers manage subscriptions, payments, and account information.

The customer portal gives customers a centralized place to manage purchases made from your Paddle account. You can link to the customer portal to add core subscription management, billing information, and payment history to your app.

Illustration of a customer portal showing a subscription page. The total is $120, which is shown at the top in a large font. The screen shows an items list with two products and an itemized breakdown of the quantity, tax, and total. It shows a totals section with subtotal, discount total, and tax, and grand total. On the left hand side are details of the subscription, including the next billing date, payment method, and past transactions.

How it works

When integrating Paddle, you need to build workflows to let customers manage their subscriptions, payments, and account information. You can do this in two ways:

  • Build your own workflows

    You can use the Paddle API to build your own billing management screens. For example, you can use the cancel subscription operation to build a workflow to let customers cancel their subscription.

  • Link to the customer portal from your app

    You can link to the customer portal, letting Paddle handle billing management. For example, you can link to the cancel subscription page in the customer portal to let customers cancel their subscription.

While building your own workflows is great for deep integration, the customer portal is fully hosted by Paddle and includes core billing functionality out-of-the-box, making it quicker to integrate.

Customer portal sessions

You can link directly to the customer portal, where customers can log in using their email address. However, for the best customer experience, we recommend creating a customer portal session when linking to a customer portal from your app.

Customer portal sessions generate authenticated links that automatically sign a customer in to the customer portal. This makes sense in the context of your app, where customers are already signed in and linking to a screen that asks them to log in again might cause confusion.

Authenticated links include a token parameter, which Paddle uses to identify the customer and present their information in the portal. These tokens are unique and impossible to guess, restricted to a particular customer, and automatically expire. They can only be generated with the Paddle API using a valid API key.

Customer portal sessions are temporary and shouldn't be cached. Create a new customer portal session each time you want to generate authenticated links to the customer portal.

Deep links

As well as linking to the customer portal homepage, you can create links that take customers to specific pages in the portal. For example, you can create links that take customers to the cancellation page for a specific subscription. This means you can add buttons or links to your app for particular workflows, like updating payment details or canceling a subscription.

Before you begin

Customer portal sessions are for customers, so you'll need the Paddle ID of a customer that you want to generate authenticated links for. You can list customers using the Paddle API or search for them in the dashboard.

Generate an authenticated link to the customer portal homepage

Create a customer portal session for a customer to generate an authenticated link to the customer portal homepage. Customers can do things like see their past payments and download invoices.

Send a POST request to the /{customer_id}/portal-sessions endpoint. You don't need to include a request body.

POSThttps://api.paddle.com/customers/{customer_id}/portal-sessions
customer_idstring

Paddle ID of the customer that you want to create a customer portal session for.

Response

If successful, Paddle returns the new customer portal session entity. urls.general.overview is an authenticated link to the customer portal homepage for a customer.

Generate links for subscription management workflows

Pass an array of subscriptions when creating a customer portal session for a customer to generate deep links that let customers make changes to their subscriptions.

  1. Get subscriptions

    Get the subscriptions that you want to create deep links for.

  2. Build request

    Build a request that includes a list of subscriptions.

  3. Create your portal session

    Send the request to create a customer portal session. Paddle creates it and generates authenticated links for you.

Get subscriptions

To create deep links for subscriptions, you'll need their Paddle IDs. You can list subscriptions filtered by customer_id to return a paginated list of subscriptions for a customer.

Response

If successful, Paddle responds with a paginated list of subscriptions for a customer.

For each subscription you want to generate deep links for, extract the id and save these for later — we'll use this in the next step.

Build request

Build a request that includes a subscription_ids array.

Your array should contain a list of strings, where each string is the Paddle ID of a subscription that you want to generate deep links for.

subscription_idsarray[string]

Paddle ID of a subscription related to this customer to create an authenticated customer portal deep link for.

Request

This example creates a customer portal session with deep links for two subscriptions.

Create customer portal

Send a POST request to the /{customer_id}/portal-sessions endpoint with the request you built.

POSThttps://api.paddle.com/customers/{customer_id}/portal-sessions
customer_idstring

Paddle ID of the customer that you want to create a customer portal session for.

Response

If successful, Paddle returns the new customer portal session entity. It includes urls.general.overview, which is an authenticated link to the customer portal homepage for a customer.

The subscriptions array includes an object for each subscription passed in the request. For each subscription, Paddle generates an authenticated cancel_subscription and update_subscription_payment_method link.

Related pages