Skip to main content

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
Related Guides:
Prefer to learn by reading real code? We maintain five open-source plugin examples on GitHub β€” complete checkouts with thank-you pages in five different visual styles (editorial, neon, luxe, solar, arcade), all MIT-licensed and ready to fork.πŸ‘‰ Browse the Open-Source Examples or jump straight to github.com/TagadaPay/plugins.
Time: ~20 minutes | Difficulty: Beginner

🎯 What You’ll Build

A 3-page checkout funnel:
  1. Checkout Page - Collect payment β†’ Create order
  2. Upsell Page - Show special offer using static resources
  3. Thank You Page - Display order confirmation
Data Flow:

Step 1: Create Your Project


Step 2: Create Plugin Manifest

The manifest tells TagadaPay about your plugin’s pages and what data they need. Create plugin.manifest.json in your project root:
Basic Info:
  • name, pluginId, version - Identify your plugin
  • mode: "direct-mode" - Plugin runs directly (no iframe)
  • category - Helps organize in marketplace
Pages Array: Each page defines:
  • path - The URL path (e.g., /checkout, /upsell/:id)
  • features - What type of page it is (checkout, offer, thankyou)
  • requirements - What data this page needs
  • remappable - Allows custom URLs (highly recommended!)
Requirements Explained:
Resource Types:
  • query - From URL query params (?checkoutToken=abc)
  • path - From URL path (/thankyou/:orderId)
  • context - From previous step’s funnel context
  • static - From CRM configuration (offers, products, etc.)
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 config/resources.static.json:
The SDK automatically loads this file in local development!
Configuration lets merchants customize your plugin without code changes.Structure:
  • schema.json - Defines what settings are available
  • uiSchema.json - How settings appear in CRM UI
  • presets - Pre-made configurations merchants can choose
Example Preset:
Each config file should have metadata:
Access in code with usePluginConfig() hook!

Step 3: Setup Provider

The TagadaProvider wraps your app and provides all functionality. Create src/main.tsx:
That’s it! TagadaProvider automatically:
  • βœ… Creates a session
  • βœ… Initializes the funnel
  • βœ… Enables debug mode (local dev)
  • βœ… Handles redirects
No manual initialization needed!

Step 4: Build Checkout Page

Create src/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. Create src/pages/UpsellPage.tsx:
Step by Step:
  1. In Manifest - Declare you need an β€œoffer” resource:
  1. In Code - Access it via stepConfig (recommended) or context.static (fallback):
  1. Merchant Configures - In CRM, they select which offer to show:
  1. For Local Testing - Create config/resources.static.json:
Why This is Powerful:
  • 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 Resources (from previous pages):
  • βœ… Dynamic data from previous steps
  • βœ… Changes per user/session
  • βœ… Example: order details, customer info
Static Resources (configured in CRM):
  • βœ… Fixed per funnel configuration
  • βœ… Same for all users
  • βœ… Example: offer IDs, product IDs, variant IDs

Step 6: Build Thank You Page

Create src/pages/ThankYouPage.tsx:

Step 7: Setup Routing

Create src/App.tsx:

Step 8: Create Config for Local Testing

Create config/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

Create src/index.css:

Step 10: Test Locally

1

Test Checkout

  1. Fill in email and name
  2. Use card: 4242424242424242
  3. Click β€œPay”
  4. Should redirect to upsell page βœ…
2

Test Upsell

  1. Should show your test offer (from resources.static.json)
  2. Order info from checkout should be visible
  3. Click β€œAccept” or β€œDecline”
  4. Should redirect to thank you page βœ…
3

Test Thank You

  1. Should show order confirmation
  2. Should show upsell if accepted
  3. Should display customer email
Check the Console!The SDK logs helpful debug information:
  • βœ… Funnel Initialized - Funnel is ready
  • πŸš€ Auto-redirecting to: - Navigation happening
  • Check funnel.context to see all available data

Step 11: Deploy to TagadaPay

Follow the prompts to deploy your plugin!

Step 12: Configure in CRM

  1. Go to Funnels β†’ Create new funnel
  2. Add Checkout Step β†’ Select your plugin β†’ /checkout page
  3. Add Upsell Step β†’ Select your plugin β†’ /upsell page
    • ⚠️ Important: Configure Static Resources:
      • Resource: offer
      • Select an offer from the dropdown
  4. Add Thank You Step β†’ Select your plugin β†’ /thankyou/:orderId page
  5. Save & Test!
Don’t forget to configure the static resource for the upsell page!Without it, the upsell won’t show. In the CRM:
  • Funnel β†’ Upsell Step β†’ Static Resources section
  • Select β€œoffer” β†’ Choose an offer from your catalog

πŸŽ‰ 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 resources

Static Resources

Let merchants configure offers/products without code changes

Context Resources

Access data from previous steps via funnel.context.resources

Auto-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

In Manifest - Add to requirements:
In Code - Access it:
For Local Testing:
Yes! Add anything to resources:
Access on next page:
Always check if it exists:
Or provide a default:
In your component:
Or use the SDK debug drawer (in development mode)!