The Commerce Layer checkout application (React) provides you with a PCI-compliant, PSD2-compliant, and production-ready checkout flow powered by Commerce Layer APIs. You can fork this repository and deploy it to any hosting service or use it as a reference application to build your own.
Commerce Layer is a multi-market commerce API and order management system that lets you add global shopping capabilities to any website, mobile app, chatbot, wearable, voice, or IoT device, with ease. Compose your stack with the best-of-breed tools you already mastered and love. Make any experience shoppable, anywhere, through a blazing-fast, enterprise-grade, and secure API.
- Deploy the forked repository to your preferred hosting service or host it yourself. You can deploy with one click below:
-
Create your organization and get your credentials by following this getting started guide.
-
Build your sales channel with your favorite technologies and frameworks by leveraging our developer resources and API reference.
-
Get an access token for your application. You should generate this in your sales channel or use our Javascript authentication library.
-
Create an order associated with some line items.
-
Checkout the previously created order using the URL format:
<your-deployed-checkout-url>/:order_id?accessToken=<token>. For example:https://checkout.yourbrand.com/PrnYhoVeza?accessToken=eyJhbGciOiJIUzUxMiJ9.
We will be launching a (free) hosted version of this checkout application and a new dashboard soon. With the hosted checkout feature enabled, you can install the checkout application with a single click, customize your organization logo and primary colors, and automatically deploy the application from the dashboard.
Kindly reach out to support@commercelayer.io or the chat on our website if you're interested in becoming an early user.
-
Fork this repository (you can learn how to do this here).
-
Clone the forked repository like so:
git clone https://github.com/<your username>/commercelayer-react-checkout.git && cd commercelayer-react-checkout- First, run the development server:
yarn dev
-
Set your environment with
.env.localstarting from.env.local.sample. -
Open http://localhost:3000 with your browser to see the result. You can use the following format to open the checkout:
http://localhost:3000/?accessToken=...&orderId=.... -
Make your changes and create a pull request (learn how to do this).
-
Someone will attend to your pull request and provide some feedback.
There are many access tokens on rollbar settings, we need to use one related to post client items.
-
Request an invite to join Commerce Layer's Slack community.
-
Create an issue in this repository.
-
Ping us on Twitter.
This repository is published under the MIT license.
