Trigger a Checkout from Your Website
Send customers from any website, landing page, or app to your TagadaPay-hosted checkout page. No server, no API key, no authentication.How It Works (3 lines)
Where do I find my
storeId and variantId? Go to the CRM dashboard → your store settings for the store ID, and Products → select a variant for the variant ID.Full Copy-Paste Example
Drop this into any HTML page and it works:store_abc123, variant_main_product, and the checkoutUrl with your real values.
Parameters
Required
| Parameter | Type | Description |
|---|---|---|
baseApiUrl | string | Always https://app.tagadapay.com/api/public/v1/checkout/init (or .dev for testing) |
storeId | string | Your TagadaPay store ID (e.g., store_019dd15cdb5b) |
checkoutUrl | string | The URL of your hosted checkout page (e.g., https://secure.mystore.com/checkout) |
items | array | Array of line items to add to the cart |
Line Item Fields
| Field | Type | Required | Description |
|---|---|---|---|
variantId | string | Yes | Product variant ID |
priceId | string | No | Specific price ID (for subscriptions or multi-price variants) |
quantity | number | Yes | Quantity |
Optional
| Parameter | Type | Description |
|---|---|---|
currency | string | Currency code (default: USD) |
defaultItem | object | Fallback line item used when items is empty |
More Examples
Bundle (Multiple Items)
Subscription
Dynamic Product (e.g., from a product page)
What Happens Behind the Scenes
- The customer clicks your button
- The browser navigates to
https://app.tagadapay.com/api/public/v1/checkout/init?storeId=...&items=...&checkoutUrl=... - TagadaPay creates a checkout session with the items in the cart
- TagadaPay redirects the customer to your
checkoutUrlwith acheckoutTokenquery parameter - Your checkout page loads and the Plugin SDK picks up the token automatically
Helper Function Source Code
Helper Function Source Code
If you want to customize the helper or understand how it works, here’s the full annotated version:This is a pure client-side function. It builds a URL string — no network requests, no dependencies. You can inline it, bundle it, or rewrite it in any language.
No-Code Alternative
You can also generate direct links from the CRM dashboard without writing any code. Go to Storefront → Direct Links, select your products, and copy the URL.Next Steps
External Page Tracker
Add funnel analytics to your external pages
Funnel Orchestrator
Create multi-step checkout flows
Custom Domains
Set up a custom domain for your checkout
Plugin SDK
Build custom checkout experiences
