Unity Buy SDK

You can use the Unity Buy SDK to integrate physical products directly into games and apps made with the Unity game engine.


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. Access the Unity Buy SDK

Using the Unity Buy SDK, you can do the following:

  • Fetch information about products on your Shopify store
  • Create an in-game shopping cart where customers can add products
  • Generate a checkout for customers to purchase products

When you're ready to start building, explore the examples in GitHub to see how to implement the SDK in your app.

View the Unity Buy SDK on GitHub.

Selling merchandise in your game

The Unity Buy SDK enables a fully customizable experience, allowing you as a game developer to place physical products for sale at any point during the game experience.

With so many options, it can be tough to decide where to start. The following examples show some of the best ways to sell merchandise in your game.

Create an in-game gift shop

Demo of an in-game gift shop in Alto's Adventure

The most basic merchandise experience is the native in-game storefront. Allowing players to browse and purchase merchandise as they would on an online web-based store.

On July 20, 2017, award-winning indie game Alto’s Adventure released an update including an in-game gift shop that made merchandise discoverable and purchasable inside the game using the Unity Buy SDK. Over the first 30 days, the game doubled its previous year's merchandise sales and saw 75% of new sales come through the in-game storefront.

Read the full Alto's Adventure Gift Shop case study here.

Bring player-generated content to life

Demo of player-generated product creation in Northside

The concept of user-generated content (UGC) is familiar when thinking about digital content. Games like Little Big Planet, Minecraft, and Trials Evolution have shown how players enjoy being creative and making the game their own.

This UGC can be transferred to the physical world, letting players create unique products that remind them of their play experience.

Reward achievements with exclusive products

Demo of acheivement-based products in Northside

Merchandise and collectables are a great way to reward players and celebrate in-game achievements.

Exclusive pieces of merchandise can be unlocked in-game, allowing you to surprise and delight your players in new and exciting ways.

Where to get help

This SDK is not supported by Shopify support, but there are other places where you can get help.

Open a GitHub issue

You can open an issue in the GitHub repository.

Shopify Community forums

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

Shopify Experts

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