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
- Log in to your Shopify Admin
- Go to Settings → Apps and sales channels → Develop apps
- If prompted, click Allow custom app development
- Click Create an app and give it a name (e.g. "HTMLPub")
- Click Configure Storefront API scopes
- Check these two scopes:
unauthenticated_read_product_listingsunauthenticated_write_checkouts
- Click Save, then click Install app
- 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
- Open any page in the HTMLPub editor
- Click the Checkout button in the toolbar
- Select the Shopify tab
- Paste your shop domain and Storefront Access Token
- 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:
- Go to Products in your Shopify Admin
- Click on a product, then click on a variant
- Look at the URL — the number at the end is the Variant ID
Option B — From the product page:
- Go to Products in your Shopify Admin
- Click on a product
- Scroll down to the Variants section
- The variant ID is shown in the details
Step 5: Add a checkout button
Back in HTMLPub:
- Enter the Variant ID and a product name
- Set the price and currency
- 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.