Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion code_blocks/getting-started/configuring-sdk_5.js.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ Future<void> initPlatformState() async {
await Purchases.setLogLevel(LogLevel.debug);

PurchasesConfiguration configuration;
if (Platform.isAndroid) {
if (kIsWeb) {
// Only needed if you're targeting web
configuration = PurchasesConfiguration(<public_web_billing_api_key>)
} else if (Platform.isAndroid) {
configuration = PurchasesConfiguration(<public_google_api_key>);
if (buildingForAmazon) {
// use your preferred way to determine if this build is for Amazon store
Expand Down
34 changes: 28 additions & 6 deletions docs/getting-started/installation/flutter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ excerpt: Instructions for installing Purchases SDK for Flutter
hidden: false
---

:::success Flutter Web Support in Beta
We're excited to announce that Flutter Web support is now in beta! This means you can now use RevenueCat to manage subscriptions across your Flutter web, mobile, and desktop apps.

Learn more about the Flutter Web beta [here](https://www.revenuecat.com/blog/engineering/flutter-sdk-web-support-beta/).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be good to update this blogpost to mention it's out of beta, and then, add a link to that new blogpost. Might need help from someone to update that. @Jethro87 do you have access to your blogpost?

:::

## What is RevenueCat?

RevenueCat provides a backend and SDKs that wrap StoreKit, Google Play Billing, and [RevenueCat Web Billing](/web/web-billing/overview) to make implementing in-app and web purchases and subscriptions easy. With our SDK, you can build and manage your app business on any platform without having to maintain IAP infrastructure. You can read more about [how RevenueCat fits into your app](https://www.revenuecat.com/blog/where-does-revenuecat-fit-in-your-app) or you can [sign up free](https://app.revenuecat.com/signup) to start building.
Expand Down Expand Up @@ -119,6 +113,34 @@ import 'package:purchases_flutter/purchases_flutter.dart' as purchases;
After that, you can reference the types from `purchases_flutter` as `purchases.Foo`, like `purchases.CustomerInfo`.
:::

## Flutter Web Configuration

RevenueCat's Flutter SDK supports web platforms, allowing you to manage subscriptions across Flutter web, mobile, and desktop apps using the same SDK.

### Web Product Configuration

To enable web purchases in your Flutter app, you'll need to configure products using a [RevenueCat Web Billing app](/web/web-billing/overview).

1. **Create a Web Billing App** in your RevenueCat project dashboard
2. **Configure your products** for web purchases

For detailed instructions on setting up web products and configuring Web Billing, see the [Web Billing Overview](/web/web-billing/overview).

:::info Web Billing vs In-App Purchases
Web Billing is RevenueCat's billing engine for web purchases, which uses Stripe as the payment processor. This is separate from iOS/Android in-app purchases but integrates with the same RevenueCat entitlements system, allowing unified subscription management across platforms.
:::

### Current Limitations

When using the Flutter SDK on web, keep in mind the following:

- **Web Billing Required**: Web purchases require RevenueCat Web Billing setup. Native iOS/Android in-app purchases cannot be processed through the web platform.
- **Payment Processing**: Web Billing purchases use Stripe as the payment processor through RevenueCat Web Billing.
- **Customer Portal**: Users can manage their web subscriptions through the RevenueCat-provided customer portal.
- **Platform Separation**: Web products must be configured separately from iOS/Android products in the RevenueCat dashboard, though entitlements can be shared across platforms.
- **User Identity**: For unified cross-platform subscriptions, ensure you're using the same `appUserID` across web and mobile platforms.
- **Unsupported operations**: There are some unsupported operations. Mainly operations `getProducts`, `purchaseProduct` or `restorePurchases` won't work on web environments.

## Next Steps

- Now that you've installed the Purchases SDK in Flutter, get started by [configuring an instance of Purchases →](/getting-started/quickstart#3-using-revenuecats-purchases-sdk)