Shopify Checkout Script
When you connect a Shopify store to Tagada, we inject a small checkout script (internallyTgdMapper) into your store’s active theme (layout/theme.liquid). This script rewrites your storefront Buy Now / Checkout buttons so the cart is handed off to a Tagada funnel checkout instead of Shopify’s native checkout.
The script is what makes “buy on Shopify, pay on Tagada” work. Which funnel/step the script is bound to decides which checkout — and therefore which payment routing — your storefront uses. Switching a store from one processor to another often comes down to re-pointing this script at a new funnel.
Prerequisites
- The store must have Shopify connected (OAuth) in the dashboard (Integrations tab).
- All endpoints require your API key as a Bearer token:
The four operations
| Operation | Method & path | SDK |
|---|---|---|
| Read the installed script + its config | GET /stores/{storeId}/shopify-script | tagada.shopify.checkScript(storeId) |
| Install / update the script | PUT /stores/{storeId}/shopify-script | tagada.shopify.updateScript(storeId, { config }) |
| Remove the script | DELETE /stores/{storeId}/shopify-script | tagada.shopify.removeScript(storeId) |
| Audit the theme for conflicts | GET /stores/{storeId}/shopify-script/audit | tagada.shopify.audit(storeId) |
There is one script per store.
PUT replaces any existing Tagada block in the theme — it does not stack a second one.Read the current script
Find out whether the script is installed and which funnel/step it currently points at. PassfunnelId + stepId to also get conflict detection against a target funnel.
Response
Install or switch the script
Send a partial config — the server fills sensible defaults for anything you omit. The most common use is binding the storefront checkout to a specific funnel/step.Response
Migrating a store to a new processor
Re-pointing the script is exactly how you move a live Shopify store onto a new payment funnel (e.g. a new Stripe-MoR or cascade funnel) without touching the storefront theme by hand:Publish the new funnel
Save and promote the new funnel to its production domain — see Funnel Lifecycle.
Check the current binding
checkScript(storeId, { funnelId, stepId }) — confirm isConflict shows the store still points at the old funnel.Switch
updateScript(storeId, { config: { funnelId, stepId } }) — the storefront now routes new carts through the new funnel’s payment flow.Remove the script
Strips all Tagada script blocks (current and legacy v1) from the active theme. The storefront reverts to Shopify’s native checkout.Audit the theme
Even with the script installed, a theme can silently bypass or break the integration — a commented-out native button, a hardcoded external redirect, afetch interceptor, or a leftover legacy script. The audit scans checkout-critical theme files and reports findings by severity.
Response
Authentication troubleshooting
401 Missing or invalid API key
401 Missing or invalid API key
Send
Authorization: Bearer YOUR_API_KEY with a non-empty, valid key. In shell scripts, an empty variable produces Authorization: Bearer with nothing after it — the same 401 as a missing header. Verify with echo ${#KEY} before calling.Shopify connection not found
Shopify connection not found
The store has no active Shopify OAuth connection. Connect Shopify in the dashboard (Integrations tab) and retry.
403 You do not have access to this store
403 You do not have access to this store
Your API key belongs to a different account than the store’s owner. Use a key from the account that owns
storeId.