Skip to content

MultiDigital/commercelayer-react-checkout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commerce Layer React Checkout

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 React Checkout demo

What is Commerce Layer?

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.

Table of contents


Getting started

  1. Deploy the forked repository to your preferred hosting service or host it yourself. You can deploy with one click below:

Deploy to Netlify Deploy to Vercel Deploy to Heroku Deploy to Digital Ocean Deploy to Amplify

  1. Create your organization and get your credentials by following this getting started guide.

  2. Build your sales channel with your favorite technologies and frameworks by leveraging our developer resources and API reference.

  3. Get an access token for your application. You should generate this in your sales channel or use our Javascript authentication library.

  4. Create an order associated with some line items.

  5. 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.

Future updates

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.

Contributors guide

  1. Fork this repository (you can learn how to do this here).

  2. Clone the forked repository like so:

git clone https://github.com/<your username>/commercelayer-react-checkout.git && cd commercelayer-react-checkout
  1. First, run the development server:
yarn dev
  1. Set your environment with .env.local starting from .env.local.sample.

  2. 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=....

  3. Make your changes and create a pull request (learn how to do this).

  4. Someone will attend to your pull request and provide some feedback.

Rollbar token

There are many access tokens on rollbar settings, we need to use one related to post client items.

Need help?

  1. Request an invite to join Commerce Layer's Slack community.

  2. Create an issue in this repository.

  3. Ping us on Twitter.

License

This repository is published under the MIT license.

About

Commerce Layer Hosted Checkout

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.0%
  • Other 1.0%