Stripe
This page describes how to connect Stripe
Overview
Apphud offers the capability to monitor web-based payments processed through Stripe. This integration allows you to track web subscriptions within Apphud and grant premium access to mobile app users who purchase subscriptions via the web.
Key Features:
- Seamless Premium Access: Automatically grant premium access in your mobile app to users who subscribe through your website, ensuring a unified experience across platforms.
- Cross-Platform Analytics: Access unified subscription data through Apphud’s dashboard, enabling easy tracking, monitoring, and analysis of web and app-based subscriptions in one place.
How to add integration?
- Navigate to the Apphud Settings and select the Web Payments page
- Click the Connect button to link your Stripe account to Apphud. Follow the on-screen instructions to complete the integration:
That’s It! You’re Done! Your Stripe account is now integrated with Apphud.
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
You can connect one Stripe account to multiple Apphud apps. To do this, add the apphud_client_id
to the metadata
hash before initiating a purchase. The Apphud Client ID is available in the 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’re using a Stripe SDK other than Node.js, please refer to 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 the IDs 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
Once your Stripe integration is complete, add your Stripe Product IDs to the Apphud Product Hub:
- Create your products in Stripe.
- Enter the Product IDs into the Apphud Product Hub.
When adding products to Apphud, include the Price ID. We recommend to create Stripe products with a single price point. To offer different pricing options, create separate products for each pricing tier.
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. However, for immediate cancellations, prorated amounts will not be counted.
Billing Issues: If a subscription renews but the invoice remains unpaid, Apphud will mark the subscription as having a billing issue until Stripe confirms the payment.
Renewals: Stripe generates renewal events before actual invoice payments. As a result, Apphud defers renewal events and does not forward them 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.
Updated 11 days ago