TagadaPay Plugin SDK v2
Build custom checkout experiences, funnels, and interactive e-commerce components with the TagadaPay Plugin SDK. Choose between React for rich UIs or vanilla JavaScript for lightweight implementations.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
- React
- Vanilla JS
Core Concepts
1. Provider-Based Architecture (React)
The SDK uses React Context to provide global state and functionality:- 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:3. Automatic Features
The SDK handles common tasks automatically: Auto-initialization- Funnel session initializes automatically when
TagadaProvidermounts - No manual
initializeSession()calls needed - Controlled via
autoInitializeFunnelprop (default:true)
- Navigating with
funnel.next()automatically redirects to the next step URL - No need for custom
onNavigatehandlers - Browser is redirected immediately after successful navigation
- 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:Available Hooks (React)
Funnel Navigation
| Hook | Description |
|---|---|
useFunnel() | Navigate between steps and access session context |
Data Fetching
| Hook | Description |
|---|---|
useCheckout() | Fetch and manage checkout session |
useProducts() | Fetch products with caching |
useOffer() | Fetch offers for upsells |
useStoreConfig() | Fetch store settings |
useCustomer() | Fetch customer data |
Utilities
| Hook | Description |
|---|---|
useCurrency() | Format money with formatMoney() |
useTranslation() | Multi-language translation helper |
usePluginConfig() | Access plugin configuration |
Standalone SDK (Vanilla JS)
For non-React applications, use the standalone SDK:Environment Detection
The SDK automatically detects your environment:| Environment | When | Behavior |
|---|---|---|
local | localhost, *.localhost, ngrok | Debug mode ON, local config loaded |
development | dev., staging. | Debug mode ON |
production | app.*, other domains | Debug mode OFF |
debugMode prop:
Configuration Presets
Define multiple configuration variants with metadata:meta.name is displayed in the CRM marketplace when merchants select presets.
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
