-
Notifications
You must be signed in to change notification settings - Fork 33
First draft built with codex #1350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| curl -X POST \ | ||
| https://api.revenuecat.com/v1/receipts \ | ||
| -H 'Content-Type: application/json' \ | ||
| -H 'X-Platform: paypal' \ | ||
| -H 'Authorization: Bearer YOUR_REVENUECAT_PAYPAL_APP_PUBLIC_API_KEY' \ | ||
| -d '{ "app_user_id": "my_app_user_id", | ||
| "fetch_token": "I-XXXXXXXXXXXX" | ||
| }' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| title: PayPal Product Setup | ||
| slug: paypal-products | ||
| excerpt: Setting up products and plans in the PayPal Dashboard | ||
| hidden: false | ||
| --- | ||
|
|
||
| To set up products for PayPal, start by logging into the PayPal Developer Dashboard. This guide assumes basic knowledge of PayPal's subscription products and plans. For more information, visit PayPal's [documentation](https://developer.paypal.com/docs/subscriptions/). | ||
|
|
||
| ## Create a product and plan | ||
|
|
||
| 1. In the PayPal Developer Dashboard, create a Product for your subscription. | ||
| 2. Create one or more Plans under that Product (monthly, yearly, etc.). | ||
| 3. Copy the Plan ID for each plan you want to track in RevenueCat. | ||
|
|
||
| :::info Product Mapping between RevenueCat and PayPal | ||
| A PayPal Plan maps to a Product in RevenueCat. If you create multiple plans under a single PayPal product, you'll import each plan into RevenueCat as a separate product. | ||
| ::: | ||
|
|
||
| ## Integrate with RevenueCat | ||
|
|
||
| If you're ready to integrate your new PayPal plans with RevenueCat, continue our [product setup guide →](/getting-started/entitlements). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,6 +74,12 @@ Paddle is a popular all-in-one payment infrastructure that allows you to accept | |
|
|
||
| - [Learn more about Paddle](/web/integrations/paddle) | ||
|
|
||
| #### PayPal | ||
|
|
||
| PayPal lets you accept payments in your own checkout and track that revenue in RevenueCat. This integration is for external purchase syncing only (no Web SDK or Web Billing checkout). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should remark more that it's not for WEB SDK or Web billing checkout (yet, at least) |
||
|
|
||
| - [Learn more about PayPal](/web/integrations/paypal) | ||
|
|
||
| ## Platform Server Notifications | ||
|
|
||
| After adding your configurations, we recommend setting up [Platform Server Notifications](/platform-resources/server-notifications). These notifications will ensure RevenueCat is notified of purchases and subscription events as soon as possible, and will speed up [webhooks](/integrations/webhooks) and integration delivery times. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| --- | ||
| title: PayPal | ||
| slug: paypal | ||
| excerpt: Track PayPal revenue in RevenueCat | ||
| hidden: false | ||
| --- | ||
|
|
||
| RevenueCat supports PayPal for tracking revenue from purchases that happen outside RevenueCat. This lets you unlock entitlements and report PayPal revenue in RevenueCat. | ||
|
|
||
| :::info Invite-only beta feature | ||
| This integration is currently in beta, and available by invite only. If you're interested in tracking PayPal purchases within RevenueCat, [let us know](https://form.typeform.com/to/A4Nfn0aI). | ||
| ::: | ||
|
|
||
| :::info External purchase tracking only | ||
| This integration allows you to import purchases taking place in PayPal. It does not add payment method support to RevenueCat Web Billing, Web SDK, Web Purchase Links, or Paywalls, which we're looking to support in the future. | ||
| ::: | ||
|
|
||
| ## Supported features | ||
|
|
||
| - Import and sync PayPal purchases created in your own checkout or backend. | ||
| - Automatic tracking via PayPal webhooks (server-to-server notifications). | ||
| - Manual tracking via the RevenueCat POST receipt endpoint. | ||
|
|
||
| ### Current limitations | ||
|
|
||
| - Only one product per purchase is supported (single item per order or subscription). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. another current limitations:
|
||
|
|
||
| ## 1. Create PayPal products and plans | ||
|
|
||
| Create subscription Products and Plans in PayPal. You will import the PayPal **Plan ID** into RevenueCat as the product identifier. | ||
|
|
||
| For detailed steps, see [PayPal Product Setup](/getting-started/entitlements/paypal-products). | ||
|
|
||
| ## 2. Add a PayPal configuration in RevenueCat | ||
|
|
||
| 1. Log into your RevenueCat account | ||
| 2. Go to your project | ||
| 3. Go to **Apps & providers** | ||
| 4. Add a new web configuration | ||
| 5. Select the PayPal provider | ||
| 6. Enter your **Client ID** and **Client Secret** from the PayPal Developer Dashboard | ||
| 7. Set whether this is **Sandbox** or **Production** | ||
|
|
||
| :::info Sandbox and production are separate | ||
| PayPal sandbox and production environments use different credentials. Create separate RevenueCat configurations for each environment. | ||
| ::: | ||
|
|
||
| ## 3. Configure purchase tracking | ||
|
|
||
| To automatically track PayPal purchases, enable **Track new purchases from server-to-server notifications** in the PayPal configuration. RevenueCat will create and manage the required PayPal webhook for you. | ||
|
|
||
| ### App User ID detection methods | ||
|
|
||
| RevenueCat can associate PayPal purchases with an App User ID in two ways: | ||
|
|
||
| 1. **Use anonymous App User IDs**: RevenueCat will create an anonymous App User ID for each purchase. | ||
| 2. **Use PayPal custom_id**: Set PayPal's `custom_id` to the RevenueCat App User ID when you create the subscription or order. RevenueCat will read `custom_id` from webhook events and use it as the App User ID. | ||
|
|
||
| If `custom_id` is missing, the purchase will be associated with an anonymous App User ID. | ||
|
|
||
| ## 4. Import PayPal plans into RevenueCat | ||
|
|
||
| 1. Go to **Product catalog → Products** in the RevenueCat dashboard | ||
| 2. Find your PayPal configuration and click **Import** | ||
| 3. Select the PayPal plans you want to use and click **Import** | ||
|
|
||
| ## 5. Create entitlements in RevenueCat | ||
|
|
||
| Follow the [entitlements guide](/getting-started/entitlements) to attach your PayPal products to entitlements. | ||
|
|
||
| ## 6. Send PayPal tokens to RevenueCat (manual) | ||
|
|
||
| If you are not using webhook-based tracking, you can send PayPal purchases to RevenueCat through the [POST receipt endpoint](/migrating-to-revenuecat/migrating-existing-subscriptions/receipt-imports). | ||
|
|
||
| The only required fields when sending your PayPal purchase to the RevenueCat API are the following: | ||
|
|
||
| - `fetch_token`: Your PayPal subscription ID (starts with `I-`) or a PayPal order/capture ID for one-time purchases. | ||
| - `app_user_id`: The App User ID that the purchase should be applied to. | ||
|
|
||
| **Headers** | ||
|
|
||
| - `X-Platform`: Should be set to `paypal`. | ||
| - `Authorization`: It should be `Bearer YOUR_REVENUECAT_PAYPAL_APP_PUBLIC_API_KEY` | ||
|
|
||
| import curlContent from "@site/code_blocks/getting-started/paypal_1.curl?raw"; | ||
|
|
||
| <RCCodeBlock tabs={[{ type: "curl", content: curlContent }]} /> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,8 @@ RevenueCat Web provides a set of tools that allow you to easily start selling su | |
|
|
||
| RevenueCat Web includes the following features: | ||
|
|
||
| - [Web Billing](configuring-overview): RevenueCat's own billing engine for subscriptions and one-time purchases. | ||
| - Support for a range of 3rd party billing engines (see [below](#supported-billing-engines)) | ||
| - **[Web SDK](web-sdk):** A JavaScript SDK to integrate web purchases into your web app. | ||
| - **[Web Purchase Links](web-purchase-links):** A hosted, customizable purchase flow provided by RevenueCat, to enable web purchases with no code. | ||
| - **[Web Purchase Button](../../tools/paywalls/creating-paywalls/web-purchase-button):** A component available in RevenueCat's [paywalls](/tools/paywalls) to link to a web checkout from in-app (app to web). | ||
|
|
@@ -38,6 +40,7 @@ Billing engines are the subscription management layer responsible for configurin | |
| | RevenueCat Web Billing | [Supported](web-sdk) | [Supported](web-purchase-links) | n/a | | ||
| | Stripe Billing | Not supported | Not supported | [Supported](../integrations/stripe) | | ||
| | Paddle Billing | Not supported | [Supported](../guides/paddle-app-to-web) | [Supported](../integrations/paddle) | | ||
| | PayPal | Not supported | Not supported | [Supported](../integrations/paypal) | | ||
|
|
||
| ### RevenueCat Web Billing | ||
|
|
||
|
|
@@ -70,12 +73,18 @@ If you already have a Stripe Billing implementation with active subscriptions an | |
|
|
||
| See [Stripe Billing](/web/integrations/stripe) | ||
|
|
||
| ### Paddle Billing integration | ||
| ### PayPal integration | ||
|
|
||
| Similarly to Stripe Billing, the Paddle Billing integration allows you to sell products and subscriptions directly in Paddle Billing, and sync those to RevenueCat. It is currently not supported in our Web SDK or Web Purchase Links, so requires you to use one of Paddle's checkout solutions to handle purchases. | ||
| Similarly to Stripe Billing, the PayPal integration allows you to sell products and subscriptions directly in Paddle Billing, and sync those to RevenueCat. It is currently not supported in our Web SDK or Web Purchase Links, so requires you to use one of PayPal's checkout solutions to handle purchases. | ||
|
|
||
| If you already have a Paddle Billing implementation with active subscriptions and customers, you can use this integration to track those purchases in RevenueCat and unlock entitlements for your customers. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this line intended to be here or should be moved to Paddle's section? If not, we have to change |
||
|
|
||
| See [PayPal](/web/integrations/paypal) | ||
|
|
||
| ### Paddle Billing integration | ||
|
|
||
| The Paddle Billing integration allows you to sell products and subscriptions directly in Paddle Billing, and sync those to RevenueCat. It is also supported as billing provider in the Web SDK and Web Purchase Links, allowing you to manage flows with a Paddle checkout from within RevenueCat. | ||
|
|
||
| See [Paddle Billing](/web/integrations/paddle) | ||
|
|
||
| ### Fee comparison | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we mention the auto-import products functionality? That way, they don't have to copy the plan ID at all, right?