PlandalfDocsSign inStart free trial

Websites and builders

Squarespace

Paste the Plandalf script into Squarespace's Code Injection once, then add a checkout button or an inline checkout to any page with a Code Block.

Before you start

Code Injection needs a Core plan or higher (Business or Commerce on older plans). On the Basic plan, use a hosted checkout link on a normal button instead.

Add the script

These are the install steps for Squarespace. Copy the script from your checkout's Share screen (pick HTML) so it holds your own address.

  1. Install the SDK

    Settings → Advanced → Code Injection. Paste in Footer.

    <script async src="https://YOUR-ORG.plandalf.dev/js/plandalf-sdk.js"></script>
  2. Add the trigger button

    Edit the page → Add Block → Code. Paste the HTML and turn OFF "Display Source".

    <button data-plandalf-present="YOUR-CHECKOUT">Buy Now</button>
  3. Make the first open instant (optional)

    Paste this under the SDK script tag on the pages that hold the trigger. It fetches the checkout UI (about 1.2 MB) in the background while the page sits idle, so the click only pays for creating the session. Leave it off pages with no checkout: visitors download it whether or not they buy. In a React app, call sdk.preload('checkout') from the ready callback in an effect instead.

    <script>
      // Optional: fetch the checkout UI while the page is idle, so the first click opens at once.
      window.plandalf = window.plandalf || function () { (window.plandalf.q = window.plandalf.q || []).push(arguments); };
      plandalf('ready', (sdk) => sdk.preload('checkout'));
    </script>

Step 1's menu path is from older Squarespace menus. Today, open the Pages panel, scroll to Website Tools and click Code Injection. Paste the script into Footer and click Save. It then loads on every page. Squarespace's checkout pages don't run custom code.

Open a checkout from a button

Edit the page, click Add Block → Code and paste the button. Turn off Display Source so visitors see a button, not the code.

<button data-plandalf-present="YOUR-CHECKOUT">Buy Now</button>

To match your site's buttons, add Squarespace's button class, for example class="sqs-block-button-element". More options are in Buy buttons.

Show a checkout on the page

Add a Code block where the checkout should appear, turn off Display Source and paste:

<div data-plandalf-mount="YOUR-CHECKOUT" style="min-height: 480px"></div>

The checkout fills the block. Change min-height to suit your layout.

Show a deadline timer

Add a Code block with an empty element that has your deadline timer's slug. The script draws the live countdown inside it. To charge the deadline timer's current price, add data-plandalf-apply-promo with the same slug to your buy button.

<div data-plandalf-promo="YOUR-PROMO"></div>
<button data-plandalf-present="YOUR-CHECKOUT" data-plandalf-apply-promo="YOUR-PROMO">Buy Now</button>

See Countdowns.

Check it's working

  1. Open the live site

    Use a private window, so you see what a buyer sees. If you turned on Disable Scripts in Preview, the editor won't run the script, but visitors still get it. In the browser console, type plandalf: you should see a function. undefined means the script isn't on the page.

  2. Click your button

    The checkout opens over the page.

  3. Make a test purchase

    Add your built-in address, such as your-site.squarespace.com, in Plandalf under Settings → Advanced → Test domains. Checkouts there use Stripe test cards while your custom domain stays live. See Test mode.

If it isn't working

  • If you see the code as text, open the Code block and turn off Display Source.
  • Check the script is in Code Injection's Footer, saved, and that your plan includes Code Injection.
  • Add data-debug="true" to the script tag and the console logs each step the script takes.

See Troubleshooting.