Stripe adds paid revenue to your reports, so you can see which ad clicks and AI assistants preceded a payment. Card numbers never reach Lundot.
Create the key in Stripe
- In Stripe, open Developers, then API keys.
- Create a restricted key named "Lundot".
- Set Read on the account itself, Charges, Refunds and Customers (required). Optionally set Read on Subscriptions (for MRR), Invoices and Events (to pick up changes to existing objects). Set None on everything else.
- Recommended: in the key's IP restrictions, allow only Lundot's server addresses, so a copied key works nowhere else. Ask us for the current list.
Lundot refuses a key that is not safe to hold:
- A secret key (
sk_) is refused before anything is sent, because it can change your account. - A key that can write to a resource such as customers, charges, refunds, invoices, subscriptions or payment intents is refused, and the message names the resources. Lundot checks with empty requests that change nothing; they appear as failed requests in your Stripe request log.
- A key missing a required read is refused, and the message names the permission.
Connect it
- Open Settings, then Connections, and choose the site if you have several.
- In Other connections, find Stripe and choose Connect Stripe.
- Paste the key starting
rk_live_into Restricted key. A test-mode key (rk_test_) is accepted and marked "(test mode)". - Choose Connect. Lundot checks the permissions; the first sync starts within the hour.
You need a role with access to Setup and Revenue. The key is encrypted and never shown again, as for other pasted keys.
What syncs
Lundot reads Stripe every hour. The first sync loads 90 days of charges, refunds, invoices and customers, and every subscription. Revenue counts succeeded, captured charges, and succeeded refunds as negative amounts on the day they were made.
Currencies are never converted or added. Disputes are not read, so a lost dispute is not taken off revenue.
Where revenue appears
On the Product screen, under Revenue (see Product analytics). Two panels, marked "From Stripe":
- Paid revenue by ad click: net revenue by ad network and campaign.
- Paid revenue by AI assistant: net revenue by the assistant that sent the payer.
Net revenue is payments less their refunds in the period. The panels need access to Web analytics as well as Revenue.
How payments are linked to visits
A payment goes to the payer's last ad click and last AI assistant visit, up to 90 days before it, in identified visits.
Swipe sideways to see the whole diagram.
The diagram as a list
- The visitor consents, on a site with the Consented privacy profile.
- Your site calls identify with your own user id, so the tracking script ties the visitor's visits to it.
- You save the same id in Stripe as Customer metadata named lundot_distinct_id.
- Lundot syncs Stripe every hour. The first run loads the last 90 days.
- Each payment is joined to the payer's last ad click and last AI assistant visit, up to 90 days before it. A payment with no link counts in the totals and is not attributed.
- The revenue panels show the linked revenue by ad network, campaign and AI assistant.
To make the link:
- Identify the visitor with your own user id: after your consent tool grants analytics consent, call
window.lundot.identify(user.id). This needs the Consented profile; Consent Mode alone does not allow it (see Cookies and consent). - Put the same id in Stripe as metadata named
lundot_distinct_idon the Customer. Every charge and refund of that customer is then linked. Metadata on the charge itself also works, and wins.
await stripe.customers.create({
email: user.email,
metadata: { lundot_distinct_id: user.id },
});
With Checkout, pass that existing customer instead of letting Checkout create one. Metadata on a PaymentIntent, Checkout Session or Subscription is not read.
Limits:
- Ad click ids (
gclid,msclkid,fbclidand others) are kept only under the Consented profile, so new ad-click links need it. - A click in an anonymous visit before sign-in is not linked.
- Unlinked payments, and payments of erased visitors, still count in the totals.
Replace or disconnect
Replace key swaps the key. If it belongs to another Stripe account, the old account's revenue is deleted at the first sync. Disconnect deletes the stored key and stops updates; revenue already read stays until another Stripe account is connected or the site is deleted. Delete the key in Stripe too if nothing else uses it.
If Stripe stops accepting the key or it lost a permission, the row says so: connect again with a new key.