Skip to main content

iOS Buy SDK

The iOS 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.

Note

Only direct onsite gateways are supported with the Mobile Buy SDKs.


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


Anchor to Step 1: Generate an access tokenStep 1: Generate an access token

To generate an access token, you can generate one in the Shopify admin. Alternatively, you can create a custom app and use authorization code grant.


Anchor to Step 2: Make your products and collections availableStep 2: Make your products and collections available

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

Tip

If you have many products or collections, then you can use bulk actions to make them available in one step.

Anchor to Make a product availableMake 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 custom app.

Anchor to Make a collection availableMake 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 custom app.

Anchor to Step 3: Configure your appStep 3: Configure your app

You can configure your mobile app to use Apple Pay and universal links.

If you're interested in enabling native Apple Pay refer to create Apple payment processing certificates.

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.

Note

The Apple app site association file is hosted automatically on your Online Store at /.well-known/apple-app-site-association.

  1. From your Shopify admin, go to Apps.
  1. Click Develop apps.

  2. Click the name of your app.

  3. Click API Integrations.

  4. In the Storefront API integration section, click Configure.

  5. Expand the iOS Buy SDK configuration section.

  6. Enter your Apple App ID.

  7. Select Use iOS universal links.


Anchor to Step 4: Access the iOS Buy SDKStep 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
Note

If your app uses version 2 of this SDK or lower, then refer to this API reference instead.


You can use Shopify’s web checkout for your mobile app.

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.


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.

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

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

Open an issue in the GitHub repository.


Was this page helpful?