# Create and Deploy a Crystallize E-commerce Site with Vercel

**Author:** Matthew Sweeney

---

[Crystallize](https://crystallize.com/) is a super-fast GraphQL based headless e-commerce service with super structured product information management (PIM).

In this guide, you will discover how to create a [e-commerce site](https://furniture.superfast.shop/), powered by Crystallize and process payments using [Stripe](https://stripe.com/), and deploy it with [Vercel](https://vercel.com/).

You can also check out the [live e-commerce demo](https://furniture.superfast.shop/) running on [Vercel](https://vercel.com/).

## Step 1: Creating Your API Keys

Create a [Crystallize account](https://crystallize.com/signup). From the Crystallize dashboard, open the menu and select **Settings** then **Access tokens**.

Enter a name and create your token, you will be provided with both an `access-token-id` and an `access-token-secret`. You will not be shown these again, so keep the window open until you have used them in [Step 2](https://vercel.com/guides/deploying-crystallize-with-vercel#step-2:-set-up-your-crystallize-project).

If you do not already have one, [create a Stripe account](https://dashboard.stripe.com/register). From the Stripe dashboard, locate your API keys from the **Developers** link, you will need both the **Publishable** and **Secret** keys.

Once both sets of keys are available, you can move on to creating your Crystallize project.

## Step 2: Set Up Your Crystallize Project

[Set up a Crystallize project](https://crystallize.com/developers) with [`npx`](https://www.npmjs.com/package/npx) and move into the project directory:

`npx @crystallize/cli my-crystallize-project && cd my-crystallize-project`

During the setup, you will be asked a series of questions that will customize the output. Select the following options:

- Furniture demo tenant
  
- Next.js + React
  
- **Both** Vercel and a payment method
  
- Stripe
  
- Configure tokens and API keys now
  

> **Note:** To select Stripe, navigate using the arrow keys and use the spacebar to select before pressing enter to confirm.

Once you have selected these options, you will be asked to enter the API keys obtained in [Step 1](https://vercel.com/guides/deploying-crystallize-with-vercel#step-1:-creating-your-api-keys). Enter the information requested, after this has been completed, you no longer need to access the keys directly from either Crystallize or Stripe.

## Step 3: Adding Your API Keys as Secrets

Using [Vercel CLI](https://vercel.com/cli), create [sensitive environment variables](https://vercel.com/docs/projects/environment-variables/sensitive-environment-variables) to securely store the API keys received. You can find these in the `.env` file created by the project setup in [Step 2](https://vercel.com/guides/deploying-crystallize-with-vercel#step-2:-set-up-your-crystallize-project).

`vercel secrets add CRYSTALLIZE-ACCESS-TOKEN-ID [your-crystallize-access-token-id]` `vercel secrets add CRYSTALLIZE-ACCESS-TOKEN-SECRET [your-crystallize-access-token-secret]` `vercel secrets add STRIPE-PUBLISHABLE-KEY [your-stripe-publishable-key]` `vercel secrets add STRIPE-SECRET-KEY [your-stripe-publishable-key]` ## Step 4: Deploying Your Crystallize Site with Vercel To deploy your Crystallize site with [Vercel for Git](https://vercel.com/docs/concepts/deployments/git), make sure it has been pushed to a Git repository.

Import the project into Vercel using your [Git provider](https://vercel.com/import/git) of choice.

After your project has been imported, all subsequent pushes to branches will generate [Preview Deployments](https://vercel.com/docs/concepts/deployments/preview-deployments#), and all changes made to the [Production Branch](https://vercel.com/docs/concepts/deployments/git#production-branch) (commonly "main") will result in a [Production Deployment](https://vercel.com/docs/concepts/deployments/environments#production).

---

[View full KB sitemap](/kb/sitemap.md)
