All Tutorials

Build a sales channel

All Tutorials

Build a sales channel

Build a sales channel

This guide describes how to build a sales channel app. It covers authenticating to the API using OAuth, requesting the required access scopes, registering for webhooks, and, finally, making calls to the API to read product listings and create a checkout.

Before you begin

This guide assumes you've familiarized yourself with the concept of channels, including any payment processing considerations for using the Checkout API.

Creating a sales channel app

Sales channel apps require an app name and URL, as well as app setup information. If you want to process credit card payments, then you'll also need to request payment processing when you create the sales channel app.

Create an app in your Partner Dashboard


  1. From your Partner Dashboard, click Apps.
  2. On the Apps page, click Create app.
  3. Enter an App name, App URL, and Whitelisted redirection URL(s).
  4. Click Create app.

From your app's overview page you can take note of your API key and API secret key, as well as other important information.

Configure App setup

After you've created an app, you can turn it into a sales channel app and request payment processing.


  1. From your app's overview screen, click App setup.
  2. In the Sales channel section, click Turn app into sales channel.

This is a one-way process, which can't be reversed. If you no longer want your app to be a sales channel, then you will need to re-create it. Also, if your app has already been installed by Shopify merchants, then it can't be made a sales channel.

  1. Click Turn app into sales channel again to confirm that you want to convert your app into a sales channel.
  2. Click Save.

After you click Save, your app is a sales channel.

By default your app is set up to embed inside the Shopify admin. This enables you to build with the Embedded App SDK, which is required for sales channel apps.

Request payment processing

After you have turned your app into to a sales channel app, you can request payment processing to use the Checkout API with credit cards. Shopify supports a variety of payment processing methods, including third-party services such as Stripe and Spreedly.


  1. From the Sales channel section click Request payment processing.
  2. Select your PCI compliance method, as described in the table below.
PCI compliance method Description
My platform is not PCI compliant You'll need to determine a strategy for processing payments.
My platform uses Stripe You have an existing platform account with Stripe and would like to use Shopify's Stripe integration.
My platform uses a service such as Spreedly to deliver payment tokens You'd like to use Spreedly or similar service for credit card tokenization and PAN forwarding.
My platform has a certificate of compliance If you already have a PCI compliant solution in place, then you can provide Shopify with a certificate of compliance.
  1. Enter a description of your app to process your request faster.
  2. Click Request access.

A request for payment processing can take up to 7 business days. You'll receive a notification when your request is processed.

Authorizing your app with OAuth

This guide describes OAuth in the context of OAuth scopes and webhook subscriptions for sales channel apps. To learn more about OAuth, see the Oauth docs or the advanced public app tutorial that walks through the entire OAuth handshake.

A sales channel app enables merchants to list and sell their products on your marketplace or platform. Sales channel apps are public apps and use OAuth to operate on behalf of the merchant. As part of the Oauth flow, Shopify obtains the user’s authorization and issues an access token that your sales channel can use to interact with the API.

Requesting channel specific scopes

When a merchant installs your sales channel app, it must redirect them to Shopify's Oauth grant screen to request the required scopes. The route should use the following format, where shop is the domain of the merchant shop, api_key is your app's api key, scopes represents the scopes requested, and redirect_uri is where the app will redirect after install:


You can request the following OAuth access scopes for your sales channel app:

  • read_product_listings
  • write_checkouts

For more detailed information, see the OAuth documentation.

Obtaining an access token

After the merchant authorizes, your app receives the required authorization code and HMAC parameters. The authorization code is exchanged for an access token, and the HMAC parameters are used to validate the redirect is coming from Shopify. To learn about HMAC verification, see the OAuth docs.

When doing OAuth with embedded apps, your initial OAuth request redirect must escape the iframe. For more information see the Embedded App SDK Getting Started.

To get an access token, send a POST request to https://<shop>/admin/oauth/access_token. Make sure that it includes shop, client_id, client_secret, and code, where client_id is your API key, and client_secret is your app's shared secret.

After you receive the access token, you can use it to instantiate a session with Shopify.

Interacting with product listings

Using the access token, you can begin to make calls to the Shopify API. To retrieve product listings, send a GET request to the admin/product_listings.json endpoint:

curl -X GET -H "X-Shopify-Access-Token: 35df6efd065b8ce72dca9493e5ec34c5" "https://{shop}"

In response, the API returns the product listings formatted as JSON:

Registering for webhooks

After you've read the merchant’s products that are intended for your channel, you'll want to stay in sync with these product listings over time. One approach is to register a set of sales-channel specific webhooks that will notify you of changes to the product catalog.


  1. Specify the subscription topic, such as product_listings/add.
  2. Provide the webhook URL, where Shopify will send you webhook notifications.
  3. Provide the preferred response format (eg. JSON).

For example:

POST /admin/api/2020-01/webhooks.json HTTP/1.1
X-Shopify-Access-Token: 35df6efd065b8ce72dca9493e5ec34c5
Content-Type: application/json

    "webhook": {
        "topic": "product_listings/add",
        "address": "",
        "format": "json",

Processing webhooks

After you register the product_listings/add endpoint, your application will receive POST requests to the specified address when product listings are added. Your sales channel must be able to correctly process these POST requests and extract the data from the body of the request. The body of the request will contain the information about the product listing.

Note that HMAC verification for webhooks is different from OAuth verification/validation. For more information, see Using Webhooks.

Completing a payment using web URL

After you have returned a product and product variants you can complete a checkout using the Checkout API. The Checkout API returns a web_url parameter that you can use for redirecting a customer to Shopify's web checkout experience. This is the most straightforward approach if your app does not require a fully customizable checkout experience.

To create a checkout and return the web URL, send a POST request to the admin/checkouts.json endpoint:

curl -X POST -H "X-Shopify-Access-Token: 35df6efd065b8ce72dca9493e5ec34c5" -H "Content-Type: application/json" "https://{shop}" -d @checkout.json

where {shop} is the domain of your test shop, and checkouts.json is a JSON file like the following:

  "checkout": {
    "line_items": [
        "variant_id": 26756068422,
        "quantity": 1

In response, the API returns the Checkout object including the web_url parameter:

You can redirect a customer to this URL for Shopify's web checkout experience.

Next steps

Where to get help

Shopify Community forums

Visit our forums to connect with the community and find out more about the Shopify API and App development.

Shopify APIs & SDKs forum

Developing Shopify Apps with the API? This is the place to talk to your peers.