ShopifySharp is a .NET library that helps developers build custom Shopify apps using C#, .NET and GraphQL. It also handles the tricky parts of authentication and validation for you, so you can quickly get up and running with Shopify using this library.
Already using ShopifySharp and wondering how to migrate from Shopify's REST API to their GraphQL API? Head over to the wiki page where we've got a dedicated page using ShopifySharp's GraphService to send queries and mutations to Shopify.
Building an app or integration for the Shopify store is hard work. There are a ton of things you need to keep in mind when stitching together all of the API calls, redirect URLs and app settings that you'll need to use.
You're going to be asking yourself all of these questions when you try to build an app for the Shopify store:
- What on earth is GraphQL and how do I use it with .NET?
- How can I charge my users when they use my app?
- What is an embedded app?
- How should I be using Shopify's redirect URLs?
- When should I be using a proxy page?
- Am I dealing with webhooks the right way?
- How can I let my user's actual customers interact with the app?
- Can I add custom scripts to their website, and what can those scripts even do?
- How the heck do I go about testing my app?
It's difficult to find blog posts or tutorials about building Shopify apps, and downright impossible if you're trying to build them with C# and ASP.NET. Shopify's own partner blog puts a huge focus on designing themes over building real, functional apps, and their API docs only go so far if you don't know what you're looking for.
The Shopify Development Handbook is a premium educational course that distills the experience of building Shopify applications and integrations into one concise and comprehensive course.
ShopifySharp is available on NuGet. You can install it with the dotnet command line:
Package | Installation | Documentation |
---|---|---|
ShopifySharp | dotnet add package shopifysharp |
Click here. |
ShopifySharp.Extensions.DependencyInjection | dotnet add package shopifysharp.extensions.dependencyinjection |
Click here. |
Shopify has begun versioning their API, meaning new features are locked behind newer versions of the API, and older versions of the API lose support and are eventually shut off. Due to the differences in ShopifySharp's SemVer versioning, and Shopify's date-based versioning, the following table should be consulted to determine which version of ShopifySharp supports which version of Shopify's API:
ShopifySharp version | Shopify API version |
---|---|
4.x and below | None, unsupported |
5.0.0 - 5.5.0 | 2019-10 |
5.6.0 - 5.7.0 | 2020-07 |
5.8.0 - 5.10.0 | 2020-10 |
5.11.0 - 5.13.1 | 2021-07 |
5.14.0 - 5.15.0 | 2021-10 |
5.16.0 - 5.18.11 | 2022-04 |
5.19.0 - 5.19.1 | 2022-07 |
6.0.1 - 6.2.0 | 2023-01 |
6.3.0 - 6.12.2 | 2023-07 |
6.13.0 - 6.14.1 | 2024-01 |
6.15.0 - 6.17.0 | 2024-04 |
6.18.0 - 6.19.0 | 2024-07 |
6.20.0 and above. | 2024-10 |
The oldest version of .NET Framework we can support is whichever version is supported by .NET Standard 2.0.
Check the package's documentation for more information.
I first started working on ShopifySharp because .NET developers need a fully-featured library for interacting with Shopify and building Shopify apps, which didn't exist several years ago. My goal is to eventually reach 100% compatibility with the Shopify API, but, with that said, Shopify is constantly adding new APIs and altering old ones. I try my best to keep up with them, but I tend to prioritize the support of new APIs by how much I need them in my own Shopify apps.
Click the link here to be brought to all of the documentation: ShopifySharp Wiki
Check out our contribution guide for guidance on contributing new features, services, classes and bugfixes to ShopifySharp! The guide also contains details on how to set up and run ShopifySharp's test suite.