Skip to main content
Upstack Data

Stripe integration: payment and subscription events for Stripe-billed apps

For apps that bill through Stripe, send payment and subscription events to Upstack with the Upstack Pixel and JavaScript SDK, resolved to a customer before they reach the tools you spend on.

Role
Source
Category
Payments & subscriptions
Pre-built connectors
34 destinations
Plans
All plans

What Upstack captures

Every Stripe event leaves resolved to a person. Sent from your app, resolved to a person, then forwarded.

In: from StripeWhat it carries
  • subscription_initial_purchaseyou fire it for the first subscription order
  • subscription_recurring_purchaseon invoice.paid for an existing subscription
  • payment_succeededmaps to invoice.paid or charge.succeeded
  • payment_refundedmaps to charge.refunded
  • amount / currencyamount in cents, with invoiceId and subscriptionId

Events your app sends with the JavaScript SDK.

Upstack DataResolved before it is sent
  • IdentityMatched against a 750M+ device graph, so a phone browse and a desktop checkout resolve to one customer.
  • customer_typeNew or returning, resolved before send.
  • DeduplicationBrowser and server copies of the same purchase collapse on event ID, so nothing is counted twice.
  • Bot and fraud filteringAutomated traffic never reaches the model, because what you keep out of the training set matters as much as what goes in.
Out: to Meta Conversions API1 of 34 destinations
  • em, ph (SHA-256)raise Event Match Quality
  • fbclid / _fbpcredit the click that drove it
  • external_idstable person across sessions
  • event_iddedupe against the browser pixel
  • value / currencyvalue-based bidding

Conversions API with higher Event Match Quality.

About Stripe

Upstack can’t detect subscription orders on platforms other than Shopify, so a Stripe-billed app fires those events itself.

Each of Upstack’s SaaS and subscription events names the Stripe event to listen for. When Stripe reports it, your app sends the matching Upstack event, and it is resolved against the same graph as the rest of your events.

What Stripe is

Stripe processes the payment. For a lot of businesses it is also the only system that holds a complete, authoritative record of what was actually charged.

That record lives one layer below the storefront, which is why it so often disagrees with what the marketing tools believe happened.

How Stripe works

Stripe models money as a sequence of objects: a PaymentIntent that may succeed, fail or be retried, a Charge, sometimes an Invoice and a Subscription above it. A single purchase can produce several of these, and a failed-then-retried payment produces more. Stripe also sits behind the checkout rather than inside it, so it sees the money and not the session that produced it.

What you can do with it

Three jobs Stripe does once it is connected.

01

Subscription purchases as events

Fire subscription_initial_purchase for the first order and subscription_recurring_purchase each time a renewal is paid, so first orders and renewals are reported separately.

02

Resolve each event to a person

Every Stripe event is matched against a 750M+ device graph before it leaves, so a phone browse and a desktop checkout resolve to one customer rather than two strangers. Returning buyers are recognized as returning.

03

Payments and refunds

payment_succeeded, payment_failed and payment_refunded each map to a Stripe event (invoice.paid or charge.succeeded, invoice.payment_failed, charge.refunded), so money events reach Upstack when your app fires them.

How it works

How Stripe events reach Upstack.

Upstack doesn’t read Stripe directly. Your app listens for Stripe’s events and sends the matching Upstack event with the JavaScript SDK.

Install the pixel

Add the Upstack Pixel to your site or app with the non-Shopify pixel setup, then send events with the JavaScript SDK’s track, page and identify calls.

Subscriptions

Fire subscription_initial_purchase for the first subscription order and subscription_recurring_purchase when each renewal succeeds: for Stripe, when invoice.paid fires for an existing subscription, not the first invoice.

Payments and refunds

payment_succeeded maps to invoice.paid or charge.succeeded, payment_failed to invoice.payment_failed and payment_refunded to charge.refunded. The amount is sent in cents, with currency, invoiceId and subscriptionId.

Subscription lifecycle

subscription_created maps to customer.subscription.created, subscription_churned to customer.subscription.deleted, trial_ending_soon to customer.subscription.trial_will_end, and upgrades, downgrades and seat changes to customer.subscription.updated.

Not for Shopify stores

On Shopify, Upstack generates subscription events itself, so firing them manually would count them twice.

Fees come from your settings

Upstack doesn’t pull payment fees from Stripe. Gateway Cost is calculated from the rates in Cost Settings.

Setup

Send Stripe events to Upstack.

What you need

  • The Upstack Pixel on your site or app.
  • Access to the code that handles your Stripe webhooks, to fire the matching Upstack event.
SaaS and subscription events reference
  1. Step 1

    Install the Upstack Pixel

    Add the pixel script to your site or app, following the pixel setup guide.

  2. Step 2

    Choose the events

    The SaaS events reference lists each event, its properties and the Stripe event it maps to.

  3. Step 3

    Fire them on the Stripe event

    When the Stripe event arrives, call window._upstack('track', …) with the matching Upstack event and its properties, such as the amount in cents and the currency.

Check it

How to verify it’s working, and common fixes.

How to verify it’s working

  • Fire a test event and confirm it appears in Upstack under System, Events Manager, in the Real-Time Events feed, within a few minutes.

Common problems and fixes

Subscription orders counted twice.
On a Shopify store, don’t fire subscription_initial_purchase or subscription_recurring_purchase yourself. Upstack already generates them.

Pre-built connectors

Stripe forwards to 34 destinations. Connect Stripe once. Every destination is already wired.

See all 34 Stripe connectors

Documentation

Set-up reference.

Set-up, event schema and field mapping for Stripe as a source, next to the Stripe developer docs.

FAQ

Stripe integration questions.

Does Upstack connect to Stripe directly?

No. Upstack can’t detect subscription orders on platforms other than Shopify, such as a SaaS app billing through Stripe. Your app fires the subscription and payment events itself with the JavaScript SDK when Stripe reports them.

Which Stripe event should trigger a renewal?

Fire subscription_recurring_purchase when invoice.paid fires for an existing subscription, not for the first invoice.

Which Upstack events map to Stripe events?

payment_succeeded to invoice.paid or charge.succeeded, payment_failed to invoice.payment_failed, payment_refunded to charge.refunded, subscription_created to customer.subscription.created and subscription_churned to customer.subscription.deleted, among others.

Does Upstack pull payment fees from Stripe?

No. Gateway Cost comes from the rates you set in Cost Settings.

Should a Shopify store send subscription events this way?

No. On Shopify, Upstack generates subscription events itself, and firing them manually would count them twice.

Which plans include the Stripe integration?

All plans. Upstack has three plans that scale with your order volume, and the same integrations are on every plan.

Which destinations can Stripe send to?

34 destinations, including Meta Conversions API, Google Ads Conversions, TikTok Events API, Pinterest, Snapchat and Reddit. Each one has its own pre-built connector.

Guides

Guides and related pages.

Background reading for the Stripe integration, and the Upstack pages that go with it.

Similar integrations

Other sources to connect.

See all integrations

Get Stripe tracking right.

A 15-minute walkthrough tailored to your stack and channels.