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/v3.3.7/sdk.global.js"
  integrity="sha384-cojsaUZyZ/LprY5umW55XCXezNxmxlP57mt+OtLHwuWiEtpNoGvPuiV2xCWWTOek"
  crossorigin="anonymous"
  defer></script>

Name the product in your dashboard

Open your store, go to Products, 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 store id in the button. 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"
  product-id="t-shirt-medium"
  amount="25.00"
  currency="USD"
  label="T-shirt (medium)">
</coin-moebius-buy>

Publish. The button renders with the page, and the payment popup 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

Core plan or higher

Code Injection and script-bearing Code Blocks run on the Core, Plus and Advanced plans.

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

Your site can start taking payments right where it is. Add the buy button and connect your provider. Flex has no monthly subscription or card requirement at signup.