Headless SDK
Build your own store with any framework (React, Vue, Svelte, plain HTML) or AI tools (Lovable, Claude, v0) and use TagadaPay as the headless backend for checkout, payments, pixel tracking, and CRM.When to use this SDK:
- You’re building a custom store on your own hosting (Vercel, Netlify, etc.)
- You want full control over the UI while TagadaPay handles payments, PSP routing, pixel tracking, and subscriptions
- An AI tool is generating your store code and needs a simple, self-documenting API
- You want to deploy pages on TagadaPay — use the Plugin SDK instead
- You only need a checkout link — use Web Integration
- You need server-side automation — use the Node SDK
How It Works
| Module | What it does |
|---|---|
tagada.checkout | Load sessions, update cart, apply promos, handle shipping |
tagada.payment | Discover APMs, tokenize cards, process payments, handle 3DS |
tagada.offers | Load upsells/downsells, accept/decline, order bumps |
tagada.customer | Profile, orders, subscriptions |
Pixel tracking (Meta, TikTok, Snap, GTM, GA4) is configured in the TagadaPay dashboard and automatically injected into your checkout sessions. See the Pixels page for details.
Install
Quick Start
- Vanilla JavaScript
- React
- CDN / Script Tag
SDK Layers — Which Package Does What?
TagadaPay has three npm packages. Most developers only need the Headless SDK:| Package | Runs in | Purpose |
|---|---|---|
@tagadapay/headless-sdk | Browser | Checkout sessions, payments (tokenize + charge + 3DS), offers, CRM, catalog. This is the main package. |
@tagadapay/core-js | Browser | Low-level card tokenization, 3DS modal, Apple/Google Pay. Optional peer dep of headless-sdk — install it if you use tagada.payment.tokenizeCard(). |
@tagadapay/node-sdk | Server (Node.js) | Server automation: create stores, products, payment flows, webhooks, deploy to CDN, manage subscriptions. |
Design Principles
- Zero dependencies — core uses native
fetch. No axios, no lodash. - AI-first — single import, minimal config, self-contained methods. LLMs generate working code on the first try.
- Full payment coverage — same APMs, express checkout, 3DS, and PSP routing as the Plugin SDK.
- Tree-shakeable — unused modules are eliminated by bundlers.
- TypeScript-first — full type coverage, JSDoc on every method.
Next Steps
Build a Store with AI
Use Claude or Lovable to generate a storefront — TagadaPay handles the rest
Payment Setup
Discover APMs, express checkout, and payment flows
Checkout Flow
Sessions, cart, promo codes, and shipping
Emails
Transactional emails — order confirmations, subscription receipts, cart recovery
Pixels
Client-side pixel tracking for Meta, TikTok, GA4, GTM, and more
Upsells & Offers
Post-purchase offers and order bumps
