Scriptorium · VIII

Add a buy button to your Squarespace site

Sell from the Squarespace page you already keep, without moving your life into Squarespace Commerce. The button is one Code Block on the page.

Add the script tag, once

In Settings, open Advanced, then Code Injection, and paste the script tag into the Header field. It loads on every page of the site.

<script src="https://sdk.coinmoebius.com/latest/sdk.global.js"
  crossorigin="anonymous"
  defer></script>

Name the product in your dashboard

Open your project, switch to the Products tab, and add the product: a reference you choose, a name, a price, a currency. From here the dashboard writes both blocks on this page with your real project ID. What you see below is the shape.

Place the button where you sell

On the page where you sell, add a Code Block where the button belongs and paste the button into it. Save and the page is a store.

<coin-moebius-buy
  project-id="proj_YOUR_ID_HERE"
  product-id="t-shirt-medium"
  label="Buy a t-shirt">
</coin-moebius-buy>

Publish. The button renders with the page, and the payment picker loads the first time a buyer clicks it. Each additional product is the same block with a different reference and label.

Watch out for these

Business plan or higher

Code Injection and script-bearing Code Blocks run on Business and Commerce plans. Personal plans strip the code on save.

Friendly with Squarespace Commerce

The button is its own checkout with its own dashboard. Products in Squarespace's store are untouched; the two sell side by side.

On the verified list

Squarespace Code Blocks are one of the surfaces the docs list as confirmed working.

Ready when your page is

Free covers 150 transactions a month. No card to sign up.