Guides
GuidesLog In
Guides

Stripe (Beta)

This page describes how to connect Stripe

Overview

Apphud now offers the capability to monitor web-based payments processed through Stripe. This functionality enables tracking of web subscriptions within Apphud, and granting users premium access to mobile apps following their subscription purchases on the web.

Key Features:

  • Provide premium access to mobile app users who have purchased subscriptions via the web, seamlessly integrating their experience across platforms.
  • Cross-platform analytics through a unified dashboard, simplifying the monitoring and analysis of subscription data.

How to add integration?

  • Go to Apphud settings and open Web payments page:
  • To integrate your Stripe account with Apphud, simply click the Connect button and follow the on-screen instructions:

You're done!

๐Ÿ“˜

Multiple Stripe accounts

If you need to link more than one Stripe account to Apphud, please reach out to our support team for assistance and additional information.

Link a Single Stripe Account to Multiple Apps

Connecting one Stripe account to several Apphud apps is possible. To do that, add apphud_client_id to metadata hash before starting a purchase. Apphud Client ID is available in Stripe integration settings in Apphud.

const stripe = require('stripe')('your_stripe_key');
const customer = await stripe.customers.create({
  metadata: {
    apphud_client_id: 'your_apphud_client_id',
  },
});

If you use Stripe SDK other than Node.js, please follow this guide.

Matching Stripe Customers with Apphud Users

To ensure subscriptions are correctly attributed to users, match the user IDs generated by Stripe upon purchase (e.g., cus_PllrGPkQl0NEBu) with those in your app.

Save the Stripe-generated user ID on your backend and pass it to the Apphud SDK during initialization:

Apphud.start(apiKey: "YOUR_API_KEY", userID: "cus_SomeStripeId")

Alternatively, you can pass your own User ID during Stripe purchase:

const stripe = require('stripe')('your_stripe_key');
const customer = await stripe.customers.create({
  metadata: {
    apphud_user_id: 'your_apphud_user_id',
  },
});

Create Products

With Stripe integration complete, you can add Stripe Product IDs to the Apphud Product Hub:

  • First, create your products in Stripe.
  • Then, enter these Product IDs into the Apphud Product Hub.

When adding products in Apphud, you will also need to include the Price ID. It's recommended to create Stripe products with a single price point. For different pricing, consider setting up separate products.

Limitations

Refunds and Upgrades/Downgrades

Apphud does not support proration. Refunds are only processed as full amounts; partial refunds are considered full refunds.

Usage Types

Metered usage and tiered pricing are not supported. Apphud only supports per-unit pricing and recurring packages.

Cancellations

Both immediate cancellations and end-of-period cancellations are supported. For immediate cancellations, note that prorated amounts will not be counted.

Billing Issues

If a subscription renews but the invoice remains unpaid, Apphud marks the subscription as having a billing issue until payment is confirmed by Stripe.

Renewals

As known, Stripe creates renewal events before the actual invoice payment. This is why Apphud renewal Events will be deferred and not forwarded to integrations until payment is confirmed by Stripe. This may take up to an hour after renewal event.

For immediate assistance or to learn more about integrating Stripe with Apphud, please contact our support team.