How does Stripe metadata work?
Stripe Charge Metadata Guide
Context
Due to the flexibility of the Stripe platform, we’re able to match the depth of our reporting with Stripe data with additional metadata provided by the merchant dev team. Our technology pulls in on a best-effort basis from Stripe primitives like invoices
, charges
, plans
, subscriptions
, and products
.
However, not every merchant utilizes these primitives in the same way. In order to have the best experience with our platform, the merchant can choose to enrich their Stripe data with their own backend data in order the customize how the data shows up within SourceMedium.
How it works
SourceMedium uses charges
as the foundational building blocks for generating reports from Stripe. Charges
don’t initially contain context around the transaction, so in order to provide rich insights we have a metadata format customers can use to pass us order and product-level data through their charges.
If the merchant chooses to enrich their charge
object with their own data, it will override the Stripe data on a line items level.
A caveat here is that incorrect metadata in Stripe could produce incorrect reporting, therefore quality assurance is key to having correct Stripe reporting in SourceMedium.
Charges Metadata
The following data should be provided via the metadata in each charge in JSON format:
Important
Charge
metadata will not be incorporated IF the following conditions occur:
- Mal-formatted JSON object. JSON format documentation.).
- Incomplete or inaccurate line item data
- Anything marked as
required
in the example JSON above. - IF the sum of line item amounts is drastically different from the actual
charge
amount.- eg.
charge
is $100, but the metadata contains line items with a combined revenue amount of $200.
- eg.
- Anything marked as
Modules Enabled by This Data
- Orders Deep Dive
- Product Performance
- Retention/LTV
- Product Affinity