---
id: "web/web-billing/web-purchase-links"
title: "Web Purchase Links"
description: "Use Web Purchase Links to enable customers to purchase web products directly without writing code, through a RevenueCat-hosted purchase flow."
permalink: "/docs/web/web-billing/web-purchase-links"
slug: "web-purchase-links"
version: "current"
original_source: "docs/web/web-billing/web-purchase-links.mdx"
---

> **AI agents:** This is the Markdown version of a RevenueCat documentation page. For the complete documentation index, see [llms.txt](https://www.revenuecat.com/docs/llms.txt).

Use Web Purchase Links to enable customers to purchase web products directly **without writing code**, through a RevenueCat-hosted purchase flow.

Web Purchase Links support a range of use cases, with both identified and anonymous purchases. For identified users, append the customer's App User ID to the provided URL. For anonymous purchases, utilize [Redemption Links](https://www.revenuecat.com/docs/web/redemption-links), which allow customers to buy subscriptions without an App User ID and later associate the purchase with their account in your app.

## Creating a Web Purchase Link

You can set up Web Purchase Links with **RevenueCat Billing**, **Stripe Billing**, or **Paddle Billing** as the billing engine. Web Purchase Links are a hosted checkout flow; the billing engine controls where products, subscriptions, taxes, emails, and subscription management are configured.

The package selection and success-page settings below apply to Web Purchase Links generally. Checkout behavior differs by billing engine:

- **RevenueCat Billing:** RevenueCat hosts the checkout UI, using Stripe as the payment gateway.
- **Stripe Billing:** Stripe Checkout is embedded in the hosted purchase flow, and Stripe manages subscriptions, emails, and customer management.
- **Paddle Billing:** Paddle Checkout is embedded in the hosted purchase flow, and Paddle acts as billing engine and merchant of record.

### RevenueCat Billing

1. Connect payment provider: To set up a Web Purchase Link with **RevenueCat Billing**, make sure to [connect your Stripe account with RevenueCat](https://www.revenuecat.com/docs/web/connect-stripe-account), if you haven't already done so. This can only be done by the project owner.
2. Go to **Web** in the lower section of the project dashboard and add a [RevenueCat Billing config](https://www.revenuecat.com/docs/web/web-billing/web-sdk#create-a-web-config-for-your-provider).
3. Create the [RevenueCat Billing products](https://www.revenuecat.com/docs/web/web-billing/product-setup) you want to serve through your Web Purchase Link
4. Create an [offering](https://www.revenuecat.com/docs/offerings/overview) with those products
5. Go to **Funnels** in the project dashboard, then use the **Purchase Links** section to create a web purchase link.

:::info\[Anonymous purchases]
To support anonymous purchases, configure [Redemption Links](https://www.revenuecat.com/docs/web/redemption-links) in your web config settings.
:::

### Stripe Billing

To configure a Web Purchase Link with **Stripe Billing**, follow the [Stripe Billing setup guide](https://www.revenuecat.com/docs/web/integrations/stripe) to connect Stripe, create a Stripe config, import products, and create an offering containing those products. Then create a Web Purchase Link and select the Stripe config as the payment provider.

### Paddle Billing

To configure a Web Purchase Link with **Paddle Billing**, follow the [Paddle Billing setup guide](https://www.revenuecat.com/docs/web/integrations/paddle) to create a Paddle config, import products, and create an offering containing those products. If you're building an iOS app-to-web flow, see the [Paddle app-to-web purchases](https://www.revenuecat.com/docs/web/guides/paddle-app-to-web) scenario guide.

## Customize the Web Purchase Link

### Package selection (paywall)

When customers open your Web Purchase Link, they land on a package selection page. You can choose from two options for this page:

- **Show the default package selection page** (has lightweight customization and branding options)
- **Present a paywall** (fully customizable using RevenueCat's [paywall builder](https://www.revenuecat.com/docs/tools/paywalls/creating-paywalls))

#### Configuring the default package selection page

The products shown there come from the offering you’ve linked, and customers can choose from those products.

![](https://www.revenuecat.com/docs_images/web/web-billing/web-purchase-link-package-example.png)

You can customize:

- Page header and subheader
- Whether product descriptions show above product names (check the [product setup](https://www.revenuecat.com/docs/web/web-billing/product-setup) step for more info)
- Terms and conditions URL (footer)
- Look and feel, including colors and shape styling (configured separately in [the web config's customization](https://www.revenuecat.com/docs/web/customization))

:::info\[package selection can be skipped]
It's possible to skip this page, and pre-select a package by passing a `package_id` [URL parameter](#package-id).
:::

#### Presenting a paywall as the package selection page

To see how to configure a paywall in your web purchase link, see [Web Paywalls](https://www.revenuecat.com/docs/web/paywalls).

### Checkout

Once a product has been selected, Web Purchase Links using RevenueCat Billing present the RevenueCat-hosted checkout:

![](https://www.revenuecat.com/docs_images/web/web-billing/web-purchase-link-checkout.png)

#### What affects the checkout experience

- Payment methods change depending on browser, location and configuration (see [payment methods](https://www.revenuecat.com/docs/web/web-billing/payment-methods))
- Product information, prices and currencies are configured in the products (see [product setup](https://www.revenuecat.com/docs/web/web-billing/product-setup))
- Tax collection is configured in your RevenueCat Billing config and your tax provider's dashboard (see [sales tax & VAT](https://www.revenuecat.com/docs/web/web-billing/tax))
- Colors and button styles are configured in customization (see [customization](https://www.revenuecat.com/docs/web/customization))
- Email address can be pre-populated (see [URL parameters](#email))

For Stripe Billing and Paddle Billing, the checkout is provided by Stripe or Paddle. Configure provider-specific checkout behavior in the corresponding provider dashboard and RevenueCat web config.

### Success behavior

After completing a purchase, there are two configurable options:

**Show the default success page**

- Customizable header and subheader.
- Optional app download links and purchase redemption instructions (for [Redemption Links](https://www.revenuecat.com/docs/web/redemption-links))

**Redirect to a custom success page**

- Can be used to redirect to a post-purchase experience on your own website
- The App User ID is appended as a URL parameter (`app_user_id`) so you can further customize the post-purchase experience
- Can also be used to redirect the user back into the mobile app, using a custom URL scheme (requires the URL scheme to be registered with the app beforehand)
- When [Redemption Links](https://www.revenuecat.com/docs/web/redemption-links) are enabled, the redemption URL is automatically included as a query parameter named `redeem_url`

:::info\[This hosted success experience is specific to Web Purchase Links]
If you're using the [Web SDK](https://www.revenuecat.com/docs/web/web-billing/web-sdk) instead, RevenueCat does not automatically present a hosted redemption page after purchase. Your app receives redemption data in [`PurchaseResult.redemptionInfo`](https://revenuecat.github.io/purchases-js-docs/1.13.2/interfaces/PurchaseResult.html#redemptioninfo), and you decide how to present the redemption step in your own UI.
:::

#### Success page customization

Here's a default success page, with customized content, styling, and [Redemption Links](https://www.revenuecat.com/docs/web/redemption-links) enabled:

![](https://www.revenuecat.com/docs_images/web/web-billing/web-purchase-link-success-example.png)

You can customize:

- Page header and subheader
- Whether to show app download badges
- App download links (overrides only for this Web Purchase Link; defaults to app config if left empty)

![](https://www.revenuecat.com/docs_images/web/web-billing/web-purchase-link-success-config.png)

:::warning\[Changes apply immediately]
As soon as you save the above settings, those changes will be reflected immediately in your production purchase links.

You can always run tests by creating a Web Purchase Link for a different offering, and testing in sandbox.
:::

## Choose what happens for returning customers

You can choose what happens when a customer already has an entitlement or an active subscription and they return to a web purchase link.

![](https://www.revenuecat.com/docs_images/web/web-billing/web-purchase-link-choose-returning-customers.png)

### Show the success page

Automatically skips the package selection and checkout pages. It will use the configuration you set up for the success page (show a download page or redirect to a custom URL).

### Allow them to make another purchase

Allows the returning customer to purchase another product.

:::warning\[Repeated purchases of non-consumable products will fail]
Allowing multiple purchases is useful for consumable products, or when selling multiple different products to a single customer.
The transaction will fail if the customer tries to purchase the exact same product twice (for subscriptions and non-consumables). Consumable products can be purchased multiple times.

We suggest creating a dedicated offering and web purchase link for non-consumables to make sure all products can be bought as many times as the customer wants.
:::

## Distributing Web Purchase Links

When you configure a Web Purchase Link, you’ll get two URLs: one for Production and one for Sandbox.
Example format: `https://pay.rev.cat/<ProductionTokenWeGenerate>`.

To access these, go to **Funnels** in the project dashboard, then use the **Purchase Links** section. Select your Web Purchase Link and click **Share URL** to copy the URL template.

:::danger\[Do not send the sandbox URL to customers]
The Sandbox URL allows you to test purchases using [Stripe test card numbers](https://docs.stripe.com/testing#use-test-cards).
Do not distribute this link or whoever will use it will be able to subscribe to your application for free using one
of the Stripe testing cards.
:::

### Distributing to identified users (where the App User ID is known)

:::info\[example use case]
Displaying the purchase link in a web app where users are logged in
:::

You must append the URL-encoded App User ID of the customer to the link. This ensures the purchase is associated with the specific user immediately. If the ID is not appended, users will see a 404 error page on visiting the URL.

:::warning\[Use one unique App User ID per customer]
RevenueCat Billing works with identified customers. You need to specify a unique app user id for each one of the subscribers you
want to reach with this link. You can read more about this requirement [here](https://www.revenuecat.com/docs/web/web-billing/web-sdk#identifying-customers).
:::

### Distributing to anonymous users (where the App User ID is not known)

:::info\[example use case]
Embedding the purchase link on a public landing page or on social media
:::

Configure [Redemption Links](https://www.revenuecat.com/docs/web/redemption-links), which removes the need to append IDs to the URL. This approach generates anonymous user IDs, allowing customers to purchase subscriptions without prior identification. They can later associate these purchases with their accounts within your app. For comprehensive guidance on setting up and using Redemption Links, refer to [the Redemption Links documentation](https://www.revenuecat.com/docs/web/redemption-links).

### Additional URL parameters

:::info\[URL encoding recommended]
We recommend that all URL parameters are [URL encoded](https://www.urlencoder.org/) to avoid issues.
:::

Web Purchase Links support appending the following URL parameters to further customize the behavior:

#### Email

If you already have your customer's email address, use `email` to preset an email address on the payment page (cannot be overridden by subscribers): `https://pay.rev.cat/<someProductionTokenWeGenerate>/<yourAppUserId>?email=<customerEmail>`

#### Currency

For RevenueCat Billing, you can specify a currency manually by appending the `currency` query parameter to the URL. This overrides the automatic currency selection.

#### Package ID

Allows you to pre-select a package by referencing a RevenueCat `package_id` for a package in the offering, and send users directly to the checkout page.

#### Hide back button

Add `hide_back_button=true` to hide RevenueCat-rendered checkout back or return buttons where present. This is useful when sending customers directly to checkout with `package_id` and you don't want them to navigate back to package selection.

#### Custom metadata

See [custom metadata](https://www.revenuecat.com/docs/web/custom-metadata)

#### Skip purchase success

Add `skip_purchase_success=true` to bypass the final "Purchase Complete" step and immediately trigger your configured success behavior (success page or custom redirect).

#### Redirect when using WPL in iframes

Add `use_top_target_when_redirecting=true` if you are using WPLs in an iframe and want the parent page to redirect to your `redirect_url`.
If not specified the WPL will redirect using `target="_self"` causing only the iframe to redirect to your `redirect_url`.
