India — Paytm Payment Gateway · ~14 min
Connect Paytm to RevFast
Merchant key in RevFast, Payment Status webhook on https:443, and udf1 on Initiate Transaction carrying ros_uid.
- 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.
- 02
Step 2 — Connect Paytm in RevFast
1. RevFast → Settings → Payments → Paytm. 2. Paytm Dashboard → API keys (https://dashboard.paytmpayments.com/next/apikeys) → copy Merchant Key (not MID alone). 3. Paste Merchant Key in RevFast → Connect. 4. Copy the Webhook URL RevFast displays — you will paste it in Paytm yourself. Paytm does not offer an API to register webhooks. Manual paste is always required.
- 03
Step 3 — Payment Status webhook in Paytm
1. Paytm merchant dashboard → Payment Status webhook (server-to-server callback). 2. Paste the full RevFast Webhook URL (includes ?site= and ?key=). 3. Requirements from Paytm: • HTTPS only • Port 443 only — no custom ports 4. Optional: same URL as callbackUrl in Initiate Transaction body. If both websiteName and callbackUrl are sent, callbackUrl wins. RevFast verifies CHECKSUMHASH with your Merchant Key and only counts STATUS = TXN_SUCCESS.
- 04
Step 4 — udf1 on Initiate Transaction
Set body.udf1 to the ros_uid value (Paytm returns udf1 on the callback and status API). udf1 is the first user-defined field Paytm exposes on the payment flow.
// 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() || ""; // Initiate Transaction (body excerpt) { "requestType": "Payment", "mid": "YOUR_MID", "orderId": "ORDER_1789768832298", "websiteName": "WEBSTAGING", "callbackUrl": "https://YOUR-HOST/api/webhooks/paytm?site=…&key=…", "txnAmount": { "value": "1.00", "currency": "INR" }, "userInfo": { "custId": "cust_001" }, "udf1": ros_visitor_id } - 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.
- 06
Paytm troubleshooting
• No webhook hits: URL must be public https:443 — tunneling http will fail Paytm rules. • CHECKSUM failed: Merchant Key in RevFast must match the key used to sign the transaction. • Sale without visit: udf1 empty — buyer never had ros_uid (tracking not installed or paid before snippet loaded).
Install with AI
Paste into Cursor or Copilot — swap in your real Site ID first.
Connect Paytm to RevFast: Merchant Key in Settings → Payments, Payment Status webhook full RevFast URL on https:443, Initiate Transaction udf1 = ros_uid cookie.
Related
Stuck? Email hello@revfast.app or open onboarding → Need help?