Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

A small Express.js app for syncing orders from Commerce.js into Shopify.

License

Notifications You must be signed in to change notification settings

chec/commerce-js-shopify-order-sync

Repository files navigation

CommerceJS Shopify Orders Sync

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.

Setup Instructions

  1. Set up a Netlify account with a fork of the repo. See the Netlify docs for more information.
  2. Create a webhook in the dashboard with the event order.create, the URL of your Netlify app and make sure active is set.
  3. Copy the signing key from your newly created webhook and add it to the Netlify enviroment variables.
  4. 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.
  5. You can customize any extra fields in a manner similar to the example if required, otherwise you can remove those lines.

Local Project setup

npm install or yarn install

Copy example env, add Shopify credentials and webhook signing key

cp env.example .env

Run dev server

npm run start or yarn start

Server will be listening on:

  • GET http://localhost:9000/.netlify/functions/api: information response
  • POST http://localhost:9000/.netlify/functions/api/create: webhook URL

For local development use ngrok to expose your local server to the web.

License

This project is licensed under BSD-3-Clause.

⚠️ Note

This repository is no longer maintained

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.

About

A small Express.js app for syncing orders from Commerce.js into Shopify.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published