Skip to main content

TagadaPay Plugin SDK v2

Build custom checkout pages, multi-step funnels, and e-commerce experiences that run on TagadaPay’s hosting infrastructure. The SDK connects your page to TagadaPay’s backend — sessions, checkout data, payments, analytics — so you focus on the UI.
When to use this SDK:
  • You’re building a checkout / landing / thank-you page that should be hosted on TagadaPay (deployed via the Plugin CLI)
  • You want React hooks (useCheckout, usePayment, useApplePayCheckout) that read from the runtime-injected step config
  • You need TagadaPay’s funnel-step navigation, A/B routing, and edge CDN for free
When NOT to use this SDK:
  • You’re hosting your store on your own domain (Vercel, Netlify, etc.) — use the Headless SDK instead
  • You’re building a payment platform that charges for many merchants — use the Partners section
  • You only need server automation — use the Node SDK
Not sure which SDK fits your project? Compare all five SDKs side-by-side on SDKs at a glance.
Prefer to start from a working plugin? We publish five open-source, MIT-licensed checkout examples on GitHub — editorial, neon, luxe, solar, and arcade — each a complete, deployable plugin with matching thank-you pages.👉 Browse the gallerygithub.com/TagadaPay/plugins

React + TypeScript

Modern React hooks with full TypeScript support

Vanilla JavaScript

Framework-agnostic standalone SDK

Funnel System

Pass data seamlessly between funnel steps

Auto-redirect

Automatic navigation and URL routing

Quick Start


Core Concepts

1. Provider-Based Architecture (React)

The SDK uses React Context to provide global state and functionality:
What TagadaProvider does:
  • Initializes authentication and session
  • Auto-initializes funnel if enabled
  • Provides hooks like useFunnel(), useCheckout(), etc.
  • Handles automatic redirects
  • Manages debug mode based on environment

2. Funnel System

Build multi-step funnels where data flows automatically between steps:
Learn more: Funnel Resources Guide

3. Automatic Features

The SDK handles common tasks automatically: Auto-initialization
  • Funnel session initializes automatically when TagadaProvider mounts
  • No manual initializeSession() calls needed
  • Controlled via autoInitializeFunnel prop (default: true)
Auto-redirect
  • Navigating with funnel.next() automatically redirects to the next step URL
  • No need for custom onNavigate handlers
  • Browser is redirected immediately after successful navigation
Debug Mode
  • Automatically enabled in local development
  • Loads local config from config/resources.static.json
  • Disabled in production automatically

4. Plugin Manifest

Define your plugin’s pages, features, and requirements:
Learn more: Manifest Documentation

Available Hooks (React)

Funnel Navigation

Data Fetching

Step Configuration

Utilities


Standalone SDK (Vanilla JS)

For non-React applications, use the standalone SDK. It gives you the same features — just without React hooks.

Environment Detection

The SDK automatically detects your environment: Override with the debugMode prop:

Configuration Presets

Define multiple configuration variants with metadata:
The meta.name is displayed in the CRM marketplace when merchants select presets.

Step Config & Script Injection

Every funnel step can carry runtime configuration — scripts, tracking pixels, static resources, and payment flow overrides — that are injected when the page is served. This lets merchants customize behavior per funnel step without touching your plugin code.

How It Works

When TagadaPay serves your plugin, it injects a stepConfig object into the HTML (via window.__TGD_STEP_CONFIG__). The SDK reads it automatically and makes it available through useStepConfig() or useFunnel().stepConfig.

Script Injection

Merchants can add custom JavaScript to any funnel step. Scripts are injected at one of four positions and run automatically — your plugin doesn’t need any code for this. Scripts have access to window.Tagada — a global object the SDK sets up with helper methods and funnel context:

window.Tagada API

The SDK exposes these helpers on window.Tagada for injected scripts:

Reading stepConfig in Your Plugin (Optional)

If your plugin needs to read the step config directly (e.g., to conditionally render based on static resources), use the hook:
Or access it through useFunnel():

Practical Examples

In the CRM, go to your funnel → Checkout step → Scripts, and add:Name: Facebook Pixel
Position: head-end
Content:
This runs only on the checkout step. Other steps (upsell, thank you) won’t have this pixel unless you add it there too.
Name: Promo Banner
Position: body-end
Content:
No plugin code changes needed — the merchant adds this in the CRM.
Add this script to the Thank You step only:Name: Conversion Tracking
Position: body-end
Content:
Tagada.loaded() waits until the funnel is initialized, so Tagada.ressources is guaranteed to have the order data.
Each A/B variant has its own stepConfig. If variant A has a script and variant B doesn’t, only visitors assigned to variant A will see that script.This is configured in the CRM when you set up split testing on a funnel step — each variant can have its own scripts, static resources, and pixel configuration.

Next Steps

Quick Start

Build your first plugin in 15 minutes

Initialize Checkout

Create checkout sessions programmatically

Tutorial

Step-by-step plugin development

API Reference

Complete API documentation

Funnel Resources

Learn how to pass data between steps

Examples

See real plugin examples

Best Practices

Production-ready tips