Skip to main content
RevenueCat integration allows you to use Autumn alongside RevenueCat for managing mobile app subscriptions and billing. This is a read-only integration, which means that you will handle billing through RevenueCat. Autumn will receive webhook updates from RevenueCat to update the customer’s plan and features. You keep the benefits of RevenueCat’s paywalls, AB testing and SDK.
This is currently in beta, please reach out to us on Discord or email us at [email protected] to get access.

Setup Guide

1

Connect RevenueCat to Autumn

To connect RevenueCat to Autumn, you’ll need:
  • A RevenueCat project ID
  • A RevenueCat API key
To get your RevenueCat project ID, visit your RevenueCat dashboard and copy the project ID from the URL. e.g. https://app.revenuecat.com/projects/1234567890/overview will have a project ID of 1234567890.
RevenueCat dashboard showing where to find your project ID
To get your RevenueCat API key, visit the API keys section on your dashboard, select “New secret API key”, and select the following configuration:
  • API Version: V2
  • Charts metrics permissions: No access
  • Customer information permissions: Read only
  • Project configuration permissions: Read only
RevenueCat dashboard showing where to find your API key
Then, visit your Autumn dashboard, and in the “Developer > RevenueCat” section, set up your RevenueCat project ID and API key.
Autumn dashboard showing where to set up your RevenueCat project ID and API key
2

Map your RevenueCat products to Autumn products

When a RevenueCat product is purchased, define which Autumn product should be enabled for the customer.
RevenueCat is managing billing, so any plan prices in Autumn will be ignored.Since RevenueCat does not support usage-based or quantity-based pricing, any Autumn plans with these price types will not display in the mapping screen for safety.
RevenueCat products are mapped at the store-level into Autumn. This means instead of mapping a Package or an Offering, you will be mapping Products from Google Play, Apple Store, Roku or etc… instead.You can still use this in conjunction with RevenueCat’s paywalls, packages and offerings however you wish.
Autumn dashboard showing where to map your products to RevenueCat products
3

Set up the webhook integration

For Autumn to recieve updates from RevenueCat, you’ll need to set up a webhook integration.In RevenueCat, visit “Integrations > Webhooks”, and click “Add new configuration”. Use the following configuration:
  • Webhook URL: paste this from the Autumn dashboard
  • Authorization header value: paste this from the Autumn dashboard
  • Environments: Depending on your Autumn environment, you are given two different URLs. This means you should also separate your RevenueCat webhooks for test and live environments.
  • Events filter: All apps, all events.
RevenueCat dashboard showing where to set up your webhook integration
4

Integration

You should not call Autumn’s attach() or checkout() functions. Instead you should either use RevenueCat’s SDK or RevenueCat’s paywalls.When the user pays via mobile, the plan will automatically sync into Autumn. Once you have purchased a product or an add-on, you may then continue using check() or track() to manage your features.Any existing Autumn customers (that have purchased a plan via Stripe / Web) can still access their balances and features as normal on mobile. They will have an active plan in their customer object.
You should handle blocking existing Autumn customers from initiating subscriptions with RevenueCat on mobile, by checking for an active plan in their customer object.
When integrating RevenueCat and initiating your Purchases instance, you must use the appUserID parameter to pass in the customer ID from your auth system. This will allow you to sync the customer ID into Autumn, whether its a new user or an existing user from Stripe.
if you are using Expo, you can use Autumn’s React hooks too
import { useEffect } from "react";
import Purchases, { LOG_LEVEL } from "react-native-purchases";

export default function RevenueCatProvider({ userID }: { userID: string }) {
    useEffect(() => {
        Purchases.setLogLevel(LOG_LEVEL.VERBOSE);
        Purchases.configure({
            apiKey:
                process.env.EXPO_PUBLIC_REVENUE_CAT_API_KEY || "",
            appUserID: userID,
        });
    }, [userID]);

    return null;
}
Then to initiate a purchase, you can use the purchasePackage function from the Purchases SDK, or open a paywall.
<Button
    variant="default"
    size="lg"
    onPress={async () => {
        try {
            const offerings = await Purchases.getOfferings();
            const pkg = offerings.all.default.availablePackages.find(
                (x) => x.identifier === "$rc_monthly",
            );
            if (!pkg) {
                throw new Error("Package not found");
            }
            const { customerInfo } = await Purchases.purchasePackage(pkg);
            if (
                typeof customerInfo.entitlements.active["monthly"] !==
                "undefined"
            ) {
                // For immediate responsiveness, the App can rely on RevenueCat's existing entitlements system
                // with the above if statement. However, Autumn still needs to wait for the webhooks,
                // at which point the App should move onto using check and track as usual.
                alert("Successfully purchased product PRO");
            }
        } catch (e: unknown) {
            if (JSON.stringify(e).includes("Purchase was cancelled")) return;
            alert("Error purchasing product PRO");
        }
    }}
    className="w-full mt-6"
>
    <Text>Upgrade to PRO</Text>
</Button>
5

Congratulations!

You have now successfully integrated Autumn with RevenueCat.You can now use the check() and track() functions to manage your features as usual.
const { data } = await autumn.check({
    customer_id: "user_or_org_id_from_auth",
    feature_id: "pro",
});

if (data.allowed) {
    // User has access to the feature
} else {
    // User does not have access to the feature
}

Versioning Plans

Autumn’s plan versioning feature allows you to update your pricing and migrate customers between versions. However, since mobile billing has specific limitations and is handled by RevenueCat, you should keep the following in mind:
  • Whenever a RevenueCat product is purchased, the latest version of the Autumn plan will be enabled for the customer.
  • Any price set in Autumn is ignored: only the price set in RevenueCat will be used
  • If you migrate a customer from one plan version to another, the plan features will be immediately updated — just as with the standard migration process. Prices will not be updated. You should handle this in RevenueCat (your customers may need to opt-in to the new pricing).