Back to HTML Pub

How to Connect Shopify to HTMLPub

htmlpub Team
ecommerce
shopify
guide

Shopify is one of the largest ecommerce platforms in the world. Connecting it to HTMLPub lets you add Shopify checkout buttons to any published page — your customers go straight to Shopify's secure checkout.

What you'll need

  • An HTMLPub account (free or paid)
  • A Shopify store with admin access
  • Two things from Shopify: your shop domain and a Storefront Access Token

Step 1: Get your shop domain

Your shop domain looks like mystore.myshopify.com. You can find it in your Shopify Admin URL — it's the part before .myshopify.com.

Step 2: Create a Storefront Access Token

  1. Log in to your Shopify Admin
  2. Go to Settings → Apps and sales channels → Develop apps
  3. If prompted, click Allow custom app development
  4. Click Create an app and give it a name (e.g. "HTMLPub")
  5. Click Configure Storefront API scopes
  6. Check these two scopes:
    • unauthenticated_read_product_listings
    • unauthenticated_write_checkouts
  7. Click Save, then click Install app
  8. Go to the API credentials tab and copy the Storefront access token

Keep this token safe — you'll paste it into HTMLPub in the next step.

Step 3: Connect in HTMLPub

  1. Open any page in the HTMLPub editor
  2. Click the Checkout button in the toolbar
  3. Select the Shopify tab
  4. Paste your shop domain and Storefront Access Token
  5. Click Test & Connect

If the credentials are valid, you'll see a green "Connected" badge.

Step 4: Find your Variant ID

Every product in Shopify has at least one variant. You need the Variant ID to create a checkout button.

Option A — From the Shopify Admin URL:

  1. Go to Products in your Shopify Admin
  2. Click on a product, then click on a variant
  3. Look at the URL — the number at the end is the Variant ID

Option B — From the product page:

  1. Go to Products in your Shopify Admin
  2. Click on a product
  3. Scroll down to the Variants section
  4. The variant ID is shown in the details

Step 5: Add a checkout button

Back in HTMLPub:

  1. Enter the Variant ID and a product name
  2. Set the price and currency
  3. Click Add checkout button with AI

When a visitor clicks the button, they'll be taken to Shopify's checkout with that product in their cart.

Troubleshooting

"Invalid credentials" error? Double-check that your shop domain uses the .myshopify.com format and that the Storefront Access Token is correct (not the Admin API token).

Need to disconnect? Click Disconnect in the Shopify section of the checkout config.

Useful links

Keep Reading