Skip to main content

Web Purchase Links

Overview

Use Web Purchase Links to enable customers to purchase a web subscription 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, which allow customers to buy subscriptions without an App User ID and later associate the purchase with their account in your app.

Get Started

  1. Create a Web Billing App
  2. Add the Web Billing Products you want to serve through your Web Purchase Link
  3. Create an Offering with those Products
  4. Visit that Offering's details page and click on the Web Purchase Link tab
  5. Finally, click on the Create a Web Purchase Link for this Offering button
  6. To support anonymous purchases, configure Redemption Links in your Web Billing app settings.

Choose a Web Billing app from the dropdown if you have more than one

Product Selection page

The first page your customers will see when accessing your Web Purchase Link is the product selection page. In this page your customers can select one of the products included in your offering.

Here is an example:

You can customize:

  • The page header
  • The subheader
  • Choose to show or not the product description (check the product setup step for more info)
  • The terms and conditions URL (footer)
  • Visual look and feel, including colors and shape styling (configured separately in customization)

📘product selection can be skipped

It's possible to skip this page, and pre-select a package by passing a package_id URL parameter.

Checkout

Once a product has been selected, users will be presented with the checkout:

What affects the checkout experience

  • Payment methods change depending on browser, location and configuration (see payment methods)
  • Product information, prices and currencies are configured in the products (see product setup)
  • Tax collection is configured in the payment provider settings and Stripe dashboard (see sales tax & VAT)
  • Colors and button styles are configured in customization (see customization)
  • The email address can be pre-populated (see URL parameters)

Success behavior

After completing a purchase, there are two configurable options:

Show the success page

  • Includes optional app download links and purchase redemption (for Redemption Links)
  • Customizable header and subheader

Redirect to a custom URL

  • 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)

Success page customization

If you choose to show a success page here's how it will look:

You can customize:

  • The page header
  • The subheader
  • Choose whether to show the app download buttons
  • Configure the app download links

⚠️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.

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.

⚠️Repeated purchases might fail

This configuration is useful for non-consumable products, or when selling multiple 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 to create a dedicated offering/web purchase link for non-consumables to make sure all products can be bought as many times as the customer wants.

Once you've configured a web purchase link, you'll have access to two URLs formatted as https://pay.rev.cat/<someProductionTokenWeGenerate> (one for production, the other one for sandbox):

❗️Do not send the sandbox URL to customers

The Sandbox URL allows you to test purchases using Stripe test card numbers. 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)

📘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.

⚠️Use one unique App User ID per customer

Web 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.

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

📘example use case

Embedding the purchase link on a public landing page or on social media

Configure 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.

Additional URL parameters

📘URL encoding recommended

We recommend that all URL parameters are URL encoded 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

If you want to specify a currency manually, you can do so by appending the currency query parameter to the URL. This will override 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.

Custom metadata

See custom metadata