Shopify storefront API integration with existing site
If you're thinking of adding e-commerce to your existing application, turn to Shopify as it's offering great developer-friendly features such as Storefront API & Admin API with GraphQL endpoint, Webhooks, and Shopify payment(available for limited countries).
- When working with Shopify Headless, you're merely displaying the products on the existing website, and Shopify does all the heavy lifting(Payment, Shipping, Discount, and so on).
- Integrating with other external systems such as ERP, CRM or CMS is easy with Shopify.
- Shopify created git repo for various languages and frameworks to kick-start with.
Storefront API offers GraphQL endpoint which enables developers to build headless e-commerce sites, mobile apps & even sell products via video games(Shopify unity buy SDK).
Storefront API is a public-facing API, as opposed to Admin API, which means requests to the Storefront API can be made from the client side.
Request to the Admin API can be sent only via the back end of the app. Using Admin API, developers can read and write to products, inventory, orders, shipping & more.
Shopify buy SDK
"Buy SDK" is a wrapper around functionalities like fetching products, collections, line items, discounts, and so on. It basically initializes the GraphQL client with the query to make a request to Shopify with the credentials supplied.
The checkout process starts with creating a Shopify cart session from your website which then creates Shopify checkout URL. Products can be added to the cart session.
Checkout URL takes the customers to the Shopify checkout page with the products added from your website.
As I mentioned above that integrating with the business system is a breeze with Shopify. In my organization, we use NetSuite ERS. So all the orders created in Shopify need to be pushed into NetSuite for the accounts team to handle. NetSuite sends an automatic invoice to the customer If they chose to pay their order manually and then sync the order status back to Shopify via GraphQL mutation.