Skip to main content

Tagada Rx with the Headless SDK

Running your storefront on your own hosting (Vercel, Netlify, Shopify headless, an AI-generated site)? The Headless SDK ships a first-class tagada.rx module that mirrors the public storefront endpoints — no API key in the browser, ever.
Auth model: there is no key. isRequiredForProduct is public; the case routes prove ownership with the (orderId, checkoutToken) pair your checkout flow already holds. PHI transits to the clinical network and is never persisted by Tagada.
Hosting rule in affiliate (MoR) mode: you build headless on your own stack, but the resulting storefront must be deployed on your Tagada subdomain (your-brand.tgdcare.com) — LegitScript certification is tied to Tagada-hosted domains. Reserve the subdomain in the CRM storefront wizard, then work with your account manager to wire the deploy of your build onto it. Serving the storefront from your own root domain is a direct-mode capability — coming soon.

The three calls

1. Is this an Rx product?

2. Submit the case after payment

Run your normal headless checkout (tagada.checkout + tagada.payment). Once the order is paid:
Submit synchronously after payment, from the browser. Do not stash patient / intakeAnswers in your own database or queue “for later” — that would make you a PHI processor. If the call fails, keep the data in memory and offer a retry button.

3. Poll status on the thank-you page

Poll every ~10 seconds while the tab is open; the statuses come from the processed clinical webhooks, so they’re authoritative.

Full example: React thank-you page


Install the same Funnel v2 (CRM canvas)

A headless build still needs the six-step Funnel v2 so operators see landing, quiz, checkout, offer, thank-you, and portal in the CRM. Create it with the Node SDK (API key, server-side) — the browser SDK only runs the bricks. Working example: rx-storefront/ in tagada-examples. pnpm seed calls tagada.funnels.create with this graph; you can also import funnel.bundle.json from Funnels → Import bundle.
Your router must serve those exact paths. Medical intake stays on /thank-you after payment (getQuestionsForProductsubmitCase → poll). The marketing quiz on /quiz has no medical questions.
Reserve your-brand.tgdcare.com in the CRM, then deploy this build onto that subdomain (LegitScript). Own root domain is coming soon (direct mode).

What the headless module does not cover