Build Your First Checkout Funnel
Create a complete 3-step funnel: Checkout β Upsell β Thank You. Learn how data flows automatically between steps!What youβll learn:
- β Setup a React plugin project
- β Create multiple pages
- β Pass data between pages
- β Use static resources (for upsells/offers)
- β Deploy to TagadaPay
- Initialize Checkout Sessions - Create checkouts programmatically
π― What Youβll Build
A 3-page checkout funnel:- Checkout Page - Collect payment β Create order
- Upsell Page - Show special offer using static resources
- Thank You Page - Display order confirmation
Step 1: Create Your Project
Step 2: Create Plugin Manifest
The manifest tells TagadaPay about your pluginβs pages and what data they need. Createplugin.manifest.json in your project root:
π Understanding the Manifest
π Understanding the Manifest
Basic Info:Resource Types:
name,pluginId,version- Identify your pluginmode: "direct-mode"- Plugin runs directly (no iframe)category- Helps organize in marketplace
path- The URL path (e.g.,/checkout,/upsell/:id)features- What type of page it is (checkout,offer,thankyou)requirements- What data this page needsremappable- Allows custom URLs (highly recommended!)
query- From URL query params (?checkoutToken=abc)path- From URL path (/thankyou/:orderId)context- From previous stepβs funnel contextstatic- From CRM configuration (offers, products, etc.)
π― Static Resources Explained
π― Static Resources Explained
What are Static Resources?Static resources are IDs configured by merchants in the CRM. They let you build flexible plugins where merchants choose which products/offers to show without changing your code.Example Use Case:
You build an upsell page. Different merchants want to show different products. Instead of hardcoding product IDs, you use a static resource!In Manifest:In Your Code:For Local Testing:
Create The SDK automatically loads this file in local development!
config/resources.static.json:π Configuration & Presets
π Configuration & Presets
Configuration lets merchants customize your plugin without code changes.Structure:Each config file should have metadata:Access in code with
schema.json- Defines what settings are availableuiSchema.json- How settings appear in CRM UIpresets- Pre-made configurations merchants can choose
usePluginConfig() hook!Step 3: Setup Provider
TheTagadaProvider wraps your app and provides all functionality.
Create src/main.tsx:
Step 4: Build Checkout Page
Createsrc/pages/CheckoutPage.tsx:
Step 5: Build Upsell Page (Using Static Resources!)
This page shows an offer. The merchant configures which offer in the CRM using static resources. Createsrc/pages/UpsellPage.tsx:
π― How Static Resources Work
π― How Static Resources Work
Step by Step:Why This is Powerful:
- In Manifest - Declare you need an βofferβ resource:
- In Code - Access it via
stepConfig(recommended) orcontext.static(fallback):
- Merchant Configures - In CRM, they select which offer to show:
- For Local Testing - Create
config/resources.static.json:
- Same plugin code works for all merchants
- Merchants customize without touching code
- Easy A/B testing (change offer ID in CRM)
- No redeployment needed to change offers
π¦ Context vs Static Resources
π¦ Context vs Static Resources
Context Resources (from previous pages):
- β Dynamic data from previous steps
- β Changes per user/session
- β Example: order details, customer info
- β Fixed per funnel configuration
- β Same for all users
- β Example: offer IDs, product IDs, variant IDs
Step 6: Build Thank You Page
Createsrc/pages/ThankYouPage.tsx:
Step 7: Setup Routing
Createsrc/App.tsx:
Step 8: Create Config for Local Testing
Createconfig/resources.static.json:
What this does:
When developing locally, the SDK automatically loads this file. This lets you test your upsell page without configuring anything in the CRM!The SDK detects local environment and loads static resources from this file. In production, resources come from the CRM configuration.
Step 9: Add Basic Styles
Createsrc/index.css:
Step 10: Test Locally
1
Test Checkout
- Fill in email and name
- Use card:
4242424242424242 - Click βPayβ
- Should redirect to upsell page β
2
Test Upsell
- Should show your test offer (from
resources.static.json) - Order info from checkout should be visible
- Click βAcceptβ or βDeclineβ
- Should redirect to thank you page β
3
Test Thank You
- Should show order confirmation
- Should show upsell if accepted
- Should display customer email
Step 11: Deploy to TagadaPay
Step 12: Configure in CRM
- Go to Funnels β Create new funnel
- Add Checkout Step β Select your plugin β
/checkoutpage - Add Upsell Step β Select your plugin β
/upsellpage- β οΈ Important: Configure Static Resources:
- Resource:
offer - Select an offer from the dropdown
- Resource:
- β οΈ Important: Configure Static Resources:
- Add Thank You Step β Select your plugin β
/thankyou/:orderIdpage - Save & Test!
π Congratulations!
Youβve built a complete checkout funnel with:- β Multi-step navigation
- β Automatic data flow between pages
- β Static resources for flexible configuration
- β Professional UI
- β Deployed to production
π What You Learned
Funnel Navigation
Pass data between steps using
funnel.next() with resourcesStatic Resources
Let merchants configure offers/products without code changes
Context Resources
Access data from previous steps via
funnel.context.resourcesAuto-redirect
SDK handles navigation automatically
Next Steps
Funnel Resources Guide
Deep dive into passing complex data
API Reference
Explore all available hooks
Manifest Guide
Master plugin configuration
Examples
See more complete examples
Common Questions
How do I add more static resources?
How do I add more static resources?
In Manifest - Add to requirements:In Code - Access it:For Local Testing:
Can I pass custom data between pages?
Can I pass custom data between pages?
Yes! Add anything to resources:Access on next page:
What if merchant doesn't configure static resource?
What if merchant doesn't configure static resource?
Always check if it exists:Or provide a default:
How do I debug funnel context?
How do I debug funnel context?
In your component:Or use the SDK debug drawer (in development mode)!
