> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokensupply.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify

> Connect your Shopify store, sync products, and keep stock and price in step so keys deliver after checkout.

Shopify is a storefront you own, so it works a little differently from a marketplace. Your Shopify products **are** your listings, and TokenSupply reads them in rather than publishing offers against someone else's catalog. Once a product is mapped, TokenSupply delivers the keys after a buyer checks out.

## Before you start

You connect Shopify by creating an app that belongs to your own store and pasting its credentials into TokenSupply. There is no app-store review, because the app is private to your store.

* A Shopify store you manage.
* An app created in the Shopify **Dev Dashboard** (the current path), or an existing custom app from your Shopify admin (the legacy path).
* The app's Admin API scopes for products, inventory, locations, orders, and fulfillment enabled.

<Note>
  Shopify no longer lets you create custom apps in the admin, so a first-time setup uses the Dev Dashboard. The legacy custom-app path is only for an app you already have.
</Note>

## Connect Shopify

<Steps>
  <Step title="Open Shopify from Integrations">
    Go to **Integrations**, choose Shopify, and start the connect flow.
  </Step>

  <Step title="Create your app and set its scopes">
    Follow the on-screen steps to create the app in your Shopify Dev Dashboard and enable every Admin API scope listed. TokenSupply gives you the full scope list to copy, so nothing is missed. Scopes cannot be added after the app is installed, so enable them all up front.
  </Step>

  <Step title="Install the app on your store">
    Install the app you created. The app and the store must be in the same organisation, or Shopify refuses the connection.
  </Step>

  <Step title="Paste your credentials">
    Enter your shop domain (for example, `my-store.myshopify.com`) and paste the app's **Client ID** and **Client secret**. TokenSupply requests an access token for you and renews it automatically, so there is no token to copy. The client secret is stored encrypted and also verifies that incoming Shopify webhooks are genuine.
  </Step>
</Steps>

<Warning>
  Connecting verifies the products, inventory, and locations scopes and is refused if one is missing. The order and fulfillment scopes cannot be checked up front, so a missing one connects cleanly and then fails on a real order. Enable every scope in the list.
</Warning>

If you have an older custom app from your Shopify admin, use the "Connect with its access token" link instead and paste its **Admin API access token** and **API secret key**.

## Map products

On the Shopify page under **Sales channel**, click **Sync products** to read your products in from the shop. Each product becomes a row you can map to a TokenSupply product.

To map a row, open it, choose the internal product to link, and assign it. From then on TokenSupply knows which keys to sell against that Shopify product, so stock stays accurate and paid orders fulfil on their own.

You can also create a new product in your shop directly from this page with **New Product**.

## What syncs

* **Inventory.** TokenSupply pushes your key counts to the matching Shopify products, so the quantity buyers see reflects what you actually have in stock.
* **Price and status.** Shopify owns the product price, so you edit both the price and the status (Active, Draft, or Archived) together with **Edit price & status**, and the change is written to your shop. Status applies to the whole product, so on a multi-variant product every variant moves with it.

Turn on **Auto-sync** on the Shopify integration screen to keep inventory in step on a schedule, and set the interval that suits you.

## How orders arrive

Orders placed in your Shopify store appear on the **Orders** tab of the Shopify page, with the keys delivered against each one. Once **Automatic updates** is on (on the Shopify integration screen), orders, cancellations, and refunds sync from Shopify as they happen, and **Sync orders** catches anything the automatic updates missed. Each sale becomes one order in TokenSupply, whether it arrives as it happens or through a sync.

Whether keys go out on their own is set per product, not for the whole store. Open the product, go to its **Sales Channels** tab, choose **Edit listing** on its Shopify row, and turn on **Auto deliver**. With it on, TokenSupply pulls the oldest available keys and delivers them to the buyer as soon as a paid order comes in. With it off, the paid order waits on its order page until you choose **Deliver now**. Once the keys are delivered, TokenSupply marks the order fulfilled in Shopify.

Orders that Shopify already shows as fulfilled, and orders placed before you connected your store, are not imported, so a buyer is never sent keys twice.

<Note>
  Related: [Connect a sales channel](/guides/sales-channels/connect-a-sales-channel) for the overview, and [How fulfilment works](/guides/selling-fulfilment/how-fulfilment-works) for what happens after an order is placed.
</Note>
