iOS Buy SDK

The Mobile Buy SDK makes it easy to create custom storefronts in your mobile app, where customers can buy products using Apple Pay or a credit card. The SDK connects to the Shopify platform using GraphQL, and supports a wide range of native storefront experiences.

Requirements

Before you can use the iOS Buy SDK, you'll need the following:

If you want to offer Apple Pay, then you need to enable Apple Pay in the Shopify admin.

1. Generate an access token

To generate an access token, you create a private app.

When you create the private app, make sure to enable Allow this app to access your storefront data using the Storefront API, and select which types of data you want to expose to the app.

The access token is generated when you save the private app. You include the access token with any requests made from your app to Shopify.

2. Make your products and collections available

After you've generated an access token, you need to make products and collections available to your private app to access them from your app. After the products and collections are available, you can retrieve them using their respective IDs.

Make a product available

  1. From your Shopify admin, go to Products.
  2. From the Products page, click the product you want to make available.
  3. Next to SALES CHANNELS AND APPS click Manage.
  4. In the Sales channels and apps dialog box, select the box next to the name of your private app.

Make a collection available

  1. From your Shopify admin, go to Products and click Collections.
  2. From the Collections page, click the collection you want to make available.
  3. Next to SALES CHANNELS AND APPS click Manage.
  4. In the Sales channels and apps dialog box, select the box next to the name of your private app.

3. Configure your app

You can configure your mobile app to use Apple Pay and Universal Links in the Shopify admin.

Enable Apple Pay

  1. From your Shopify admin, go to Apps.

  2. Click Manage private apps.

  3. Click the name of your app.

  4. In the Storefront API section, click Configure Mobile Buy SDK settings (optional).

  5. In the Mobile Buy SDK (iOS) section, click Enable.

  6. Click Download CSR.

  7. Follow the instructions to generate your Apple Pay certificate, and then click Next.

  8. Click Upload certificate, and then select the certificate that you downloaded.

You can set up Universal Links to integrate your app with Safari. When an iOS user taps a link to your website, they'll be redirected to your app if they have it installed.

Steps:

  1. From your Shopify admin, go to Apps.

  2. Click Manage private apps.

  3. Click the name of your app.

  4. In the Storefront API section, click Configure Mobile Buy SDK settings (optional).

  5. In the Mobile Buy SDK (iOS) section, enter your App ID.

  6. Select Enable iOS Universal Links.

4. Access the iOS Buy SDK

The Mobile Buy SDK includes the iOS Buy SDK and sample apps that show how you can use the SDK.

View the iOS Buy SDK docs (version 3) on GitHub.

Checkout on mobile

You have two checkout options for your mobile app: create a native mobile checkout or use Shopify’s web checkout.

Using Shopify’s web checkout makes sure that your customers always have access to the latest version of the checkout, which is optimized for speed, conversion, and customer experience.

If you want to build a mobile app that processes credit cards using the Storefront API, then you need to turn your app into a sales channel and request payment processing.

Where to get help

Mobile app development falls outside the scope of our support service. This means that Shopify support can't help if you run into problems, unless they're specifically related to the iOS Buy SDK itself. Below are the ways you can get help with the iOS Buy SDK.

Hire a Shopify Expert

Find a Shopify Expert for hire in our ecosystem of talented development agencies.

Shopify APIs & SDKs forum

Visit the forums to connect with the community and learn more about the Shopify API and app development.

Open a GitHub issue

Open an issue in the GitHub repository.