Skip to main content
← Back to blog
Felix Cameron··9 min read

How to Connect Stripe to Instally for Revenue Tracking

Connect Stripe to Instally and see revenue per link, per campaign, per source. Step-by-step webhook setup, event mapping, and dashboard walkthrough.

Why connect Stripe to Instally?

Instally tells you which links drive installs. Stripe tells you who pays. Connect them and you see revenue per link.

If you use Stripe for in-app purchases, subscriptions, or web-based billing, this integration lets you answer questions like: "Which campaign brought in the most paying users?" and "What's the revenue per install for my blog traffic vs. my email traffic?"

Your dashboard goes from this:

SourceClicksInstalls
Creator A4,200840
Email: Launch2,400600
Blog: Comparison1,400280
To this:
SourceClicksInstallsRevenueRev/InstallPaying Users
Creator A4,200840$3,360$4.00168
Email: Launch2,400600$2,700$4.50135
Blog: Comparison1,400280$1,680$6.0084
The blog comparison post has fewer installs but the highest revenue per install. That's the kind of signal you can't get from install counts alone.

What you'll need

RequirementDetails
Instally accountRevenue tracking requires Growth ($40/mo) or Scale ($79/mo)
Stripe accountAny plan
Instally SDK integratedSee our iOS or Android guides
15 minutesSlightly longer than RevenueCat due to Stripe's webhook setup

How the integration works

Stripe sends webhook events to Instally whenever a payment-related action occurs. Instally matches the Stripe customer to an app install using a shared user ID, then credits the revenue to the link that drove the install.

The flow:

    • User clicks a tracking link → Instally records the click
    • User installs the app → Instally SDK matches the install to the click and returns an Instally user ID
    • Your app creates a Stripe customer (or updates an existing one) with the Instally user ID in the metadata
    • User makes a purchase → Stripe processes the payment
    • Stripe sends a webhook to Instally → Instally looks up the customer's Instally user ID in the metadata and matches the payment to the install
    • Revenue appears on the link in your dashboard
The critical piece is storing the Instally user ID in Stripe's customer metadata. This is how Instally ties a Stripe payment back to the link that brought the user in.

Step 1: Set up the Instally SDK

If you've already integrated the SDK, skip ahead. Otherwise, here's the minimum setup.

Swift example:

import Instally

@main
struct YourApp: App {
    init() {
        Instally.configure(appId: "YOUR_APP_ID", apiKey: "ik_live_your_key")
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
                .task {
                    Instally.trackInstall()
                }
        }
    }
}

Kotlin example:

import io.instally.sdk.Instally

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        Instally.configure(this, appId = "YOUR_APP_ID", apiKey = "ik_live_your_key")
        
        lifecycleScope.launch {
            Instally.trackInstall(this@MyApp)
        }
    }
}

Step 2: Link the Stripe customer ID to Instally

When you create or retrieve the Stripe customer for the user, pass that Stripe customer ID to Instally with setUserId. Stripe webhooks include the customer ID, so Instally can use it to match revenue back to the install.

If you create Stripe customers server-side (most common):

Your backend creates the Stripe customer and returns the customer ID to the app.

Node.js example:

const stripe = require('stripe')('sk_live_your_key');

// When creating a new customer
const customer = await stripe.customers.create({
  email: user.email
});

res.json({ stripeCustomerId: customer.id });

Python example:

import stripe

stripe.api_key = "sk_live_your_key"

customer = stripe.Customer.create(
    email=user.email
)

return {"stripeCustomerId": customer.id}

Then link that ID in the app:

Swift:

Instally.setUserId(stripeCustomerId)

Kotlin:

Instally.setUserId(context, stripeCustomerId)

Step 3: Add the Instally webhook endpoint in Stripe

    • Log in to the Stripe dashboard
    • Go to Developers > Webhooks
    • Click Add endpoint
    • Set the endpoint URL to:
https://api.instally.io/webhooks/stripe
    • Under Select events to listen to, add the following events:
Stripe eventWhat it tracks
checkout.session.completedCompleted checkout (one-time or first subscription)
invoice.paidSuccessful invoice payment (including renewals)
invoice.payment_failedFailed payment attempt
customer.subscription.createdNew subscription started
customer.subscription.updatedPlan change (upgrade/downgrade)
customer.subscription.deletedSubscription cancelled
charge.refundedRefund processed
    • Click Add endpoint
    • Copy the Signing secret (starts with whsec_)

Step 4: Add the Stripe signing secret to Instally

    • Go to the Instally dashboard
    • Navigate to Settings > Integrations > Stripe
    • Paste the Stripe webhook signing secret
    • Click Save
Instally uses the signing secret to verify that incoming webhooks are genuinely from Stripe and haven't been tampered with.

Step 5: Test the integration

Run through the full flow:

    • Create a test tracking link in Instally
    • Click it on a test device
    • Install the app (or use a development build)
    • Open the app — trackInstall should run and return the Instally user ID
    • Trigger a test purchase (use Stripe's test mode)
    • Check the Instally dashboard — revenue should appear on the test link
If it doesn't appear:
  • Check Stripe's webhook logs (Developers > Webhooks > your endpoint > Recent deliveries) for delivery failures
  • Verify the signing secret in Instally matches the one from Stripe
  • Confirm the Stripe customer has instally_user_id in their metadata
  • Make sure the instally_user_id value matches what the SDK returned from trackInstall

How Instally processes Stripe events

Stripe eventInstally action
checkout.session.completedAdds the payment amount to the link's revenue
invoice.paidAdds the invoice amount (handles renewals automatically)
invoice.payment_failedFlagged in user timeline, no revenue adjustment
customer.subscription.createdLogged as a conversion event on the link
customer.subscription.updatedAdjusts revenue tracking to new plan amount
customer.subscription.deletedMarked in user timeline for churn tracking
charge.refundedDeducts the refunded amount from the link's revenue
Refunds are handled correctly. If a user from Creator A's link gets a refund, the refunded amount is subtracted from Creator A's link revenue. This keeps your data accurate and prevents inflated revenue numbers.

Revenue metrics in your dashboard

With Stripe connected, every link in your dashboard shows:

  • Revenue: Total revenue from installs attributed to this link (minus refunds)
  • Rev/Install: Average revenue per install
  • Paying users: Number of installs that made at least one payment
  • Conversion to paid: Percentage of installs that became paying users
  • MRR contribution: Monthly recurring revenue from users acquired through this link
These metrics are updated in real time as Stripe sends webhook events.

Handling multiple products

If you sell multiple products or plans through Stripe, Instally tracks revenue at the transaction level. You'll see total revenue per link by default, but you can also filter by product in the dashboard.

For example, if you have a $9.99/month Basic plan and a $29.99/month Pro plan:

SourceInstallsBasic subsPro subsTotal revenue
Creator A84012048$2,636
Email campaign6009540$2,149
Blog traffic2805034$1,519
Blog traffic has fewer installs but a higher ratio of Pro subscriptions. Those visitors did their research and committed to the higher plan.

Using Stripe with RevenueCat

Some apps use both RevenueCat (for App Store / Play Store purchases) and Stripe (for web purchases or Stripe-powered billing). In this case, you can connect both to Instally. Revenue from each source is tracked separately but shown together on each link.

We recommend connecting both but making sure each payment event is only sent once. If RevenueCat is already forwarding Stripe events to Instally via its own webhook, don't also connect Stripe directly, or you'll double-count. Choose one path:

  • RevenueCat only: Connect RevenueCat webhook → Instally. RevenueCat handles all purchase events. See our RevenueCat guide.
  • Stripe only: Connect Stripe webhook → Instally. Use this if you bill through Stripe directly and don't use RevenueCat.
  • Both (separate sources): Connect RevenueCat for in-app purchases and Stripe for web purchases. Make sure there's no overlap in the events being sent.

Alternative: Client-side revenue reporting

If your billing setup is unusual or you want to avoid webhooks, you can report revenue directly from your app.

Swift example:

Instally.trackPurchase(
    productId: "pro_monthly",
    revenue: 29.99,
    currency: "USD",
    transactionId: "pi_stripe_payment_intent_id"
)

Kotlin example:

Instally.trackPurchase(
    context = context,
    productId = "pro_monthly",
    revenue = 29.99,
    currency = "USD",
    transactionId = "pi_stripe_payment_intent_id"
)

The webhook approach is better because it catches renewals, refunds, and plan changes automatically. Client-side tracking only captures the events your app explicitly reports.

FAQ

Does this work with Stripe's test mode?

Yes. Use your test-mode webhook signing secret when testing. Instally will process test events the same way it processes live events, but they won't mix with your production data.

What if I already have Stripe customers without the Instally user ID?

Existing customers without the instally_user_id metadata won't have their revenue attributed to a link. Their revenue will show as "organic" in the dashboard. Going forward, any new customers you create with the metadata will be tracked. You can also backfill by updating existing customers' metadata if you have the mapping.

Can I use Stripe Connect with this?

Yes. If you use Stripe Connect for creator or promoter payouts (as Instally's Business plan supports), the webhook integration works alongside it. Revenue tracking and payouts are separate systems that both use Stripe data.

How are refunds handled?

When a charge.refunded event comes in, Instally subtracts the refunded amount from the link's total revenue. Your revenue numbers stay accurate without any manual adjustment.

What currencies are supported?

Instally processes revenue in whatever currency Stripe reports. If you have customers paying in EUR, GBP, and USD, Instally converts all amounts to your account's base currency using daily exchange rates so you can compare links on equal terms.

I use Superwall or Adapty instead of (or alongside) Stripe. Do you support those?

Yes. We support Superwall and Adapty integrations as well. Each integration follows a similar webhook pattern.

---

Stripe is where the money lives. Instally is where you see which links earned it. Connect them and stop guessing which campaigns, creators, and channels are actually driving revenue.

Ready / v1.0

Stop guessing. Start shipping.

Track clicks, installs, and revenue from every link. Set up in five minutes.

Get started free