Skip to main content

Node SDK Quick Start

Time: ~5 minutes | Difficulty: Beginner
When to use this SDK:
  • Server automation: AI agents, CI/CD pipelines, batch jobs
  • Programmatically managing stores, products, payments, customers, subscriptions
  • Verifying webhook signatures
  • Provisioning sub-merchants and minting per-merchant API keys (tagada.partners.* — see the Partners section)
When NOT to use this SDK:
  • Anything that runs in a browser — tokenization, 3DS challenges, wallet sheets → use @tagadapay/core-js or the Headless SDK
  • Custom checkout UI on your own domain → pair this SDK with the Headless SDK on the browser side
Want TagadaPay to process your cards? (direct merchant, not a partner platform) See Apply for TagadaPay Processingprocessing.applications.create() with your CRM key.
Building a payment platform that charges for MANY merchants? Jump straight to the Partners tab — it walks through the full multi-tenant flow with sub-keys, auto-provisioned stores, and APMs.

What Is the Node SDK?

The Node SDK lets you control TagadaPay from your server. Think of it as the backend counterpart to the Plugin SDK — while the Plugin SDK builds the checkout UI, the Node SDK manages everything behind it.
Why use the Node SDK? If you’re an AI agent, a CI/CD pipeline, a custom backend, or just prefer code over dashboards — this is how you talk to TagadaPay programmatically.

Prerequisites

  • Node.js 18+ (nodejs.org — run node --version to check)
  • A TagadaPay API key — get one in 30 seconds (next section)

Get an API key in 30 seconds

You have three options. The first one is what AI coding tools / installers should use; the last one is what you’d do if you already have an account.
Run this in the directory where you want your .env:
Paste the 6-digit code from your inbox when prompted. Done — TAGADA_API_KEY, TAGADA_STORE_ID, and TAGADA_ACCOUNT_ID are now in .env.
Full guide with error-handling, security notes, and the framework-specific env-var mirrors tagada-init writes (Vite / Next / Astro): Get an API key from code.

Install


Initialize

That’s it. Every resource is now available via tagada.<resource>.

Example: Full Checkout Setup in 7 Steps

This script creates a processor, payment flow, store, product, and funnel — activates the checkout — then generates a checkout session link. No plugin deployment needed; TagadaPay’s native checkout is auto-injected.
For a detailed walkthrough of each step, see the Merchant Quick Start. For deploying your own pages (checkout, landing, offers) instead of the native checkout, see Funnel Pages.

Available Resources

Every resource follows the same patterns: list, retrieve, create, update, del.

Payment Flows: The Core of TagadaPay

TagadaPay is PSP-agnostic. You connect multiple processors (Stripe, Adyen, NMI, etc.) and define payment flows that route transactions intelligently.
60% of traffic goes to Stripe, 40% to Adyen. If both fail, NMI picks up the payment. All automatic.

Error Handling

The SDK throws typed errors you can catch individually:
Retries on 429, 5xx, and network errors are automatic (configurable via maxRetries).

Configuration

Pass an idempotencyKey to safely retry mutations:

TypeScript

Fully typed. Import any type you need:

Next Steps

Email Templates

Create and customize transactional emails — order confirmations, subscription receipts, cart recovery

Webhooks & Events

Real-time notifications and event log for payments, subscriptions, and more

Subscriptions

Recurring billing, trials, retries, processor migration

Multi-Stripe Routing & Vault

Connect multiple Stripe accounts, vault cards, and cascade transactions

Funnel Orchestrator

Deep dive into multi-step funnels with routing, A/B testing, and analytics

API Reference

Full REST API documentation