diff --git a/code_blocks/getting-started/paypal_1.curl b/code_blocks/getting-started/paypal_1.curl new file mode 100644 index 000000000..afbbc8a93 --- /dev/null +++ b/code_blocks/getting-started/paypal_1.curl @@ -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" + }' diff --git a/docs/getting-started/entitlements/paypal-products.md b/docs/getting-started/entitlements/paypal-products.md new file mode 100644 index 000000000..8db49ffaf --- /dev/null +++ b/docs/getting-started/entitlements/paypal-products.md @@ -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). diff --git a/docs/offerings/products-overview.md b/docs/offerings/products-overview.md index ec1e41809..18cd7be7e 100644 --- a/docs/offerings/products-overview.md +++ b/docs/offerings/products-overview.md @@ -38,6 +38,7 @@ For production, set up products in the real stores (Apple, Google, Stripe, etc.) - **[Android / Amazon Appstore ](/getting-started/entitlements/amazon-product-setup)** - **[Stripe ](/getting-started/entitlements/stripe-products)** - **[Paddle ](/getting-started/entitlements/paddle-products)** +- **[PayPal ](/getting-started/entitlements/paypal-products)** ### Free trials, promotional offers, and other product configuration diff --git a/docs/projects/configuring-products.mdx b/docs/projects/configuring-products.mdx index aa5781fca..32c9435d1 100644 --- a/docs/projects/configuring-products.mdx +++ b/docs/projects/configuring-products.mdx @@ -35,7 +35,7 @@ Before submitting to app stores, you must configure products in: - [Apple App Store Connect](/getting-started/entitlements/ios-products) - [Google Play Console](/getting-started/entitlements/android-products) - [Amazon Appstore](/getting-started/entitlements/amazon-product-setup) -- [Stripe](/getting-started/entitlements/stripe-products) or [Paddle](/getting-started/entitlements/paddle-products) for web +- [Stripe](/getting-started/entitlements/stripe-products), [Paddle](/getting-started/entitlements/paddle-products), or [PayPal](/getting-started/entitlements/paypal-products) for web Then import those products into RevenueCat. @@ -51,7 +51,7 @@ Then import those products into RevenueCat. ### With Real Stores -1. Create products in your store (Apple, Google, Amazon, Stripe, Paddle) +1. Create products in your store (Apple, Google, Amazon, Stripe, Paddle, PayPal) 2. In RevenueCat, go to **Product catalog → Products** 3. Select your store's tab 4. Import or manually add the product using the store's product identifier diff --git a/docs/projects/connect-a-store.md b/docs/projects/connect-a-store.md index 47b39ebe2..9328c67f0 100644 --- a/docs/projects/connect-a-store.md +++ b/docs/projects/connect-a-store.md @@ -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). + +- [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. diff --git a/docs/web/integrations/paypal.mdx b/docs/web/integrations/paypal.mdx new file mode 100644 index 000000000..a01b9d08a --- /dev/null +++ b/docs/web/integrations/paypal.mdx @@ -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). + +## 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"; + + diff --git a/docs/web/payment-integrations.mdx b/docs/web/payment-integrations.mdx index 4d2c53e4f..be421594d 100644 --- a/docs/web/payment-integrations.mdx +++ b/docs/web/payment-integrations.mdx @@ -7,10 +7,11 @@ hidden: false import ExternalButton from "@site/src/components/ExternalButton"; -RevenueCat supports both Stripe Billing and Paddle Billing as 3rd party billing engine integrations: +RevenueCat supports the following external payment integrations: - [Stripe Billing integration](/web/integrations/stripe) (external purchase syncing only) - [Paddle Billing integration](/web/integrations/paddle) (external purchase syncing, embedded checkout in Web Purchase Links and Web SDK) +- [PayPal integration](/web/integrations/paypal) (external purchase syncing only) To request other integrations, contact our support team or your account manager: diff --git a/docs/web/web-billing/overview.mdx b/docs/web/web-billing/overview.mdx index a6acd03a3..1ad039eaa 100644 --- a/docs/web/web-billing/overview.mdx +++ b/docs/web/web-billing/overview.mdx @@ -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. +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 diff --git a/sidebars.ts b/sidebars.ts index 7d6442234..41f01dc82 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -234,7 +234,11 @@ const webSDKCategory = Category({ label: "Billing Engine Integrations", slug: "payment-integrations", itemsPathPrefix: "integrations/", - items: [Page({ slug: "stripe" }), Page({ slug: "paddle" })], + items: [ + Page({ slug: "stripe" }), + Page({ slug: "paddle" }), + Page({ slug: "paypal" }), + ], }), Link({ label: "Guides", @@ -341,6 +345,7 @@ const offeringsCategory = Category({ Page({ slug: "amazon-product-setup" }), Page({ slug: "stripe-products" }), Page({ slug: "paddle-products" }), + Page({ slug: "paypal-products" }), Link({ label: "Web Billing Product Setup", slug: "/web/web-billing/product-setup", @@ -474,7 +479,7 @@ const platformResourcesCategory = Category({ slug: "platform-resources/apple-platform-resources", items: [ Page({ - slug: "platform-resources/apple-platform-resources/app-store-connect-setup-guide", + slug: "platform-resources/apple-platform-resources/app-store-connect-setup-guide", }), SubCategory({ label: "Service Credentials",