Skip to content
Payment providers

Dodo Payments analytics with revenue by source

2 min read · Updated · By the Reveata team

Short answerReveata connects to Dodo Payments with an API key and a webhook you add in Dodo, imports payments, refunds, disputes and subscriptions, and credits each payment to a visit through reveata_visitor_id in the checkout or payment metadata.

Dodo Payments is a merchant of record for software and digital products. Reveata reads its payments and subscriptions and adds the part Dodo cannot see: which visit, channel and campaign each customer came from.

What you get

  • Succeeded payments as revenue, without tax. A subscription's first payment is new revenue; later ones, including plan-change charges, are renewals that keep the first payment's source.
  • Refunds as negative revenue on the day they succeed.
  • Disputes that are lost or accepted take their amount out of revenue like a refund. Won, cancelled or expired disputes change nothing.
  • MRR, churn, upgrades and downgrades. Dodo can deliver events out of order; an older subscription state never overwrites a newer one.
  • Twelve months of history on connect.

How the connection works

  1. In Dodo Payments, open Developer → API keys and create a key.
  2. In Reveata, choose Dodo Payments under Settings → Payments, paste the key and connect. Test or live mode is detected from the key, so a test key only brings test payments.
  3. The card shows this connection's webhook URL. In Dodo, open Developer → Webhooks, add an endpoint with that URL and subscribe it to the events below.
  4. Paste the endpoint's signing secret (whsec_…) into the card and choose Save secret.
text
payment.succeeded, refund.succeeded, subscription.active, subscription.renewed,
subscription.on_hold, subscription.cancelled, subscription.failed, subscription.expired,
subscription.plan_changed, subscription.updated, dispute.lost, dispute.accepted

Until the secret is saved, the card shows Webhook missing and Reveata reads Dodo every hour instead, so payments arrive late rather than never. Dodo's own explanation of webhooks is in the Dodo Payments webhook docs (opens in a new tab).

How payments are matched to visits

Add the ids to the checkout session or payment metadata your server creates:

js
metadata: { reveata_visitor_id: visitorId, reveata_session_id: sessionId }

Send them from the browser with window.reveata.metadata(), or read them from the _dt_v and _dt_s cookies on your server. reveata_user_id is read too. Reveata also reads these keys from subscription metadata.

Payments without ids are matched by the customer's email for visitors you identified. Dodo adds ?payment_id=pay_… to any return URL, so your thank-you page can link the payment as well (thank-you page payments).

Frequently asked questions

Why does Reveata not create the Dodo webhook itself?

The integration is set up so that you add the endpoint in Dodo and paste its signing secret. Disconnecting deletes the webhook endpoints in Dodo that point at this connection.

Can test payments mix into my real revenue?

No. Each connection keeps the mode of its key, and a test key only ever brings test payments. Use a test key on a test website to try the setup.

What if a webhook arrives twice?

It is processed once, and each payment is stored once under its Dodo id.

See it with your own numbersReveata ties every visit and sale to the source that brought it. Add your website in a minute.
Get started
Was this page useful?
IntegrationPolar analytics with revenue attributionReveata imports Polar orders, refunds and subscriptions and receives new ones through a Polar webhook. Put the Reveata visitor id in the checkout metadata, which Polar copies onto orders and subscriptions, and each sale is credited to the visit that led to it.IntegrationRevenue attribution for custom billing with the Payments APIIf your provider is not one Reveata connects to, or you bill customers yourself, post each payment to the Reveata Payments API with a website key. Include the visitor id, a user id or an email, and the payment is attributed like any connected provider's.IntegrationStripe Checkout analytics and attributionAdd the Reveata visitor and session ids to the metadata of each Stripe Checkout Session your server creates. When Stripe reports the payment, Reveata reads the ids and credits the money to the exact visit that started the checkout.IntegrationStripe Elements and PaymentIntent analyticsWhen your server creates a Stripe PaymentIntent for Elements, the Payment Element or a mobile app, put reveata_visitor_id and reveata_session_id in its metadata. Reveata reads them when payment_intent.succeeded arrives and credits the payment to that visit.IntegrationStripe Payment Links analytics without codeThe Reveata script adds the visitor and session ids to every Stripe Payment Link, Buy Button and Pricing Table on your pages as a client_reference_id. Stripe stores it on the payment, and Reveata uses it to credit the sale to the visit, with no code to write.IntegrationStripe revenue analytics by traffic sourceReveata reads your Stripe payments, invoices, subscriptions, refunds and lost disputes through a read-only connection, then credits each payment to the visit that brought the buyer, so revenue sits next to traffic in every report.