← All guides

Global checkout on Dodo Payments · ~12 min

Connect Dodo Payments to RevFast

Dodo API key, payment.succeeded webhook (Standard Webhooks signing), and checkout session metadata with ros_visitor_id.

  1. 01

    Step 1 — Install tracking on your live site

    RevFast must see pageviews before checkout. The tracker sets a first-party cookie named ros_uid — that value is how we tie a sale to the last visit. 1. Sign in to RevFast → Settings → Site. 2. Copy the script tag and paste it just before </head> on every public page (homepage, pricing, blog, app shell — not only checkout). 3. Publish or deploy your site. 4. Open the homepage in a normal browser window (not a blocker that strips cookies). 5. In RevFast, wait until tracking shows at least one pageview (usually within a few seconds). If ros_uid never appears, fix tracking before connecting payments. A webhook alone cannot guess which visitor paid.

  2. 02

    Step 2 — Connect Dodo in RevFast

    1. RevFast → Settings → Payments → Dodo Payments. 2. Dodo Dashboard → Developer → API keys → copy test or live key. 3. Paste in RevFast → Connect. RevFast registers webhooks on your public HTTPS app URL (https://revfast.app or NEXT_PUBLIC_APP_URL on self-host). • Click Connect — we call the provider API and register the webhook when the URL is valid https. • If auto-registration fails, copy the Webhook URL from Settings → Payments and add it manually in the provider dashboard.

  3. 03

    Step 3 — Webhook in Dodo

    1. Dodo Dashboard → Developer → Webhooks → Add endpoint. 2. URL: RevFast Webhook URL from Settings (full URL with query string). 3. Event: payment.succeeded — fulfill and attribute on this event, not the browser return URL. 4. Copy the signing secret from the endpoint Overview (Standard Webhooks / whsec_ style) → paste in RevFast. Use the public https Webhook URL from RevFast Settings (not http or private IPs).

  4. 04

    Step 4 — Checkout metadata

    Dodo metadata keys: up to 40 characters, alphanumeric plus dash/underscore. ros_visitor_id is valid. Values must be string, number, or boolean — not nested objects.

    // Read the RevFast visitor cookie (set by tracker.js on your marketing site)
    const ros_visitor_id =
      document.cookie.match(/(?:^|; )ros_uid=([^;]*)/)?.[1]?.trim() || "";
    
    const ros_session_id =
      document.cookie.match(/(?:^|; )ros_sid=([^;]*)/)?.[1]?.trim() || "";
    
    await dodo.checkoutSessions.create({
      product_cart: [{ product_id: "pdt_…", quantity: 1 }],
      return_url: "https://yoursite.com/thanks",
      metadata: {
        ros_visitor_id,
        ros_session_id,
      },
    });
  5. 05

    Step 5 — Run a test payment and check Revenue

    1. Use the provider's test mode (Stripe test cards, Polar sandbox, Razorpay test keys, etc.). 2. Complete a real checkout flow on your site — the same path a customer uses. 3. In RevFast, open Revenue (or Customers). Within a minute you should see the order amount next to the pages that visitor viewed. Still empty? • Open Settings → Payments and confirm the integration shows Connected. • In the provider dashboard, open Webhooks → recent deliveries. Look for HTTP 200 from RevFast, not 401/404/500. • Confirm checkout sent metadata.ros_visitor_id (or the provider-specific field in this guide) and that the buyer had ros_uid set before paying. • Ad blockers and cross-domain checkout (pay on another domain without the snippet) break attribution — keep checkout on the same site that runs the tracker, or pass the id explicitly.

  6. 06

    Common mistakes

    • Snippet only on the marketing site but checkout on another domain without passing ros_visitor_id. • Using publishable keys (Stripe pk_) instead of secret keys / API tokens. • Fulfilling on the browser "success" page instead of waiting for the webhook (always trust the webhook). • Polar / Lemon webhooks set to Slack or Discord format instead of Raw JSON. • Paytm webhook not on https port 443. • Stripe subscriptions missing subscription_data.metadata (only session metadata was set).

Install with AI

Paste into Cursor or Copilot — swap in your real Site ID first.

Connect Dodo Payments to RevFast: API key in Settings → Payments, webhook payment.succeeded with Standard Webhooks secret, checkout metadata ros_visitor_id from ros_uid cookie.

Related

Stuck? Email hello@revfast.app or open onboarding → Need help?