A small Express.js app for syncing orders from Commerce.js into Shopify. Using the webhooks functionality triggered on order.create
, an order will be created using the Shopify API. Simply set up a Netlify account, point your forked repo and enter the necessary credentials to hook up.
You can learn more about Commerce.js & Chec at https://commercejs.com.
- Set up a Netlify account with a fork of the repo. See the Netlify docs for more information.
- Create a webhook in the dashboard with the event
order.create
, the URL of your Netlify app and make sureactive
is set. - Copy the signing key from your newly created webhook and add it to the Netlify enviroment variables.
- To get your Shopify API ceredentials, you will need to create a private Shopify app and use the crentials associated with that app. You can find more information on how to set that up and work with them here.
- You can customize any extra fields in a manner similar to the example if required, otherwise you can remove those lines.
npm install or yarn install
cp env.example .env
npm run start or yarn start
Server will be listening on:
GET http://localhost:9000/.netlify/functions/api
: information responsePOST http://localhost:9000/.netlify/functions/api/create
: webhook URL
For local development use ngrok to expose your local server to the web.
This project is licensed under BSD-3-Clause.
However, we will accept issue reports and contributions for this repository. See the contribute to the commerce community page for more information on how to contribute to our open source projects. For update-to-date APIs, please check the latest version of the API documentation.