> Checkout not opening? Match what you see, from a missing script to a declined test card or a blocked request, to the fix.

Source: https://plandalf.com/docs/help/troubleshooting

Help

# Troubleshooting

Find what you're seeing below. Most problems come down to the script not loading on the page you're looking at, or a checkout running live when you meant to test.

## Check the script loaded

Open the page your visitors see (the published page, not a builder's editor or preview), open the browser console and type `plandalf`.

-   A function: the SDK loaded. Skip to the symptom below.
-   `undefined`: the script isn't on this page or didn't load. Open the Network tab, reload, and look for `plandalf-sdk.js`. No request means the tag is missing; a failed or blocked request means something stopped it.

Add `data-debug="true"` to the script tag and the SDK logs what it does, prefixed `[plandalf]`. Warnings from Plandalf start with `[Plandalf]`.

## The checkout doesn't open

Symptom

Fix

The script isn't on the page

Paste the tag from the checkout's **Share** screen into your site's footer code, on every page with a buy button, and publish. See [Add Plandalf to your site](https://plandalf.com/docs/get-started/add-to-your-site).

The button does nothing

Check the button has `data-plandalf-present` with the checkout's slug, exactly as the **Share** screen shows it. Some builders strip custom attributes: check the published HTML. A button that only appears after a click or a route change still works, because the SDK watches the page.

Your own code says `plandalf is not defined` or `plandalf.present is not a function`

The script is async, so your code ran first. Add the [queue stub](https://plandalf.com/docs/developers/sdk#the-command-queue) and wrap your code in `plandalf('ready', …)`.

`plandalf.configure is not a function`

`configure` is only a command: use `plandalf('configure', {…})`.

The checkout opens with an error, or says it can't be found

The slug is probably wrong. Copy it again from the checkout's **Share** screen.

It works in the builder's preview but not on the site, or the reverse

See [Page builders](#builders).

## Page builders and previews

Where

What to do

Webflow

Custom code doesn't run in the Designer canvas, and footer code is added when you publish. Publish, then test on the published URL. See [Webflow](https://plandalf.com/docs/websites/webflow).

WordPress with Elementor or Divi

Their editors can show a preview that doesn't run your footer code. Test the published page, not WP admin.

Shopify

Test on your `.myshopify.com` storefront after a hard refresh; the theme customizer lags behind. Shopify's own checkout pages don't run theme scripts, so put buttons on product and landing pages. See [Shopify](https://plandalf.com/docs/websites/shopify).

Any builder

Make sure custom code is allowed on your plan and that you published after adding it.

## Caching and speed plugins

Plugins such as WP Rocket, W3 Total Cache, LiteSpeed Cache and Autoptimize can delay, combine or move scripts, which can stop the SDK loading or make it load after your code. Exclude `plandalf-sdk.js` from their "delay JavaScript", combine and minify settings, then purge the cache. Cloudflare's Rocket Loader can do the same; turn it off for the script with `data-cfasync="false"` on the tag.

## Content Security Policy

If the console shows "Refused to load" or "Refused to connect" errors naming Plandalf or Stripe, your site's Content Security Policy is blocking them. Add these to the policy, keeping what's already there:

Directive

Add

`script-src`

`https://YOUR-ORG.plandalf.dev` `https://js.stripe.com`

`connect-src`

`https://YOUR-ORG.plandalf.dev` `https://api.stripe.com`

`frame-src`

`https://js.stripe.com`

`style-src`, `font-src`

`https://fonts.googleapis.com` and `https://fonts.gstatic.com`, if your checkout uses Google Fonts

The inline queue stub needs your policy's nonce or hash if you use one. A firewall or ad blocker that blocks `plandalf.dev` has the same effect; try another browser to rule it out.

## Test purchases

Symptom

Fix

"Your request was in live mode, but used a known test card"

The checkout ran live. Look for a `[Plandalf]` console warning: either the site isn't in **Settings → Advanced → Test domains**, or no Stripe test account is connected. On a hosted link there's no warning: use the test link from the **Share** screen. See [Test mode](https://plandalf.com/docs/get-started/test-mode).

A real card is declined in test mode

Test checkouts only take Stripe's test cards, such as `4242 4242 4242 4242`.

Adding `?mode=test` to a link does nothing

That's expected. Use the **Share** screen's test link, which works for 30 days.

A test sale doesn't show in results or trigger an automation

Test purchases are left out of revenue and skip automations unless an automation has **Run on test purchases** on. Find them under **Invoices** with **Test only**.

## Identity, events and webhooks

Symptom

Fix

`identify() rejected (invalid_token)`

`identify()` takes a signed token, not an email address. See [Identify buyers](https://plandalf.com/docs/developers/identify-buyers#errors) for every code.

Your listener for `plandalf:flow-complete` or `flow:start` never runs

Those names are from older docs. The events are `start`, `purchase`, `complete` and `cancel` (`plandalf:complete` and so on, on elements). See [Events](https://plandalf.com/docs/developers/events).

A gate opens the checkout again, or `access` is `false` after paying

The check runs again after the purchase with the data your sync function returns. Return fresh data from it. See [Gates](https://plandalf.com/docs/developers/gates#sync).

Every webhook fails signature checks

Compute the signature over the raw body, before parsing, with this endpoint's own secret. See [Verify signatures](https://plandalf.com/docs/api/verify-signatures).

Webhooks stopped arriving

An endpoint that goes 3 days without a successful delivery is turned off. Fix it, then register it again. See [Webhooks](https://plandalf.com/docs/api/webhooks#delivery).

No webhooks for test purchases

Test events only go to endpoints registered with a `test_` key.

## Still stuck

Use the chat in the bottom corner of the dashboard. Tell us the page URL, what you clicked and anything the console shows.

Something wrong or missing? Email [hello@plandalf.com](mailto:hello@plandalf.com).
