/integration-walkthrough

Build an end-to-end integration with Primer and start accepting payments in 3 simple steps: create a secure checkout using our Universal Checkout, tokenize the payment method and authorize a payment against the payment token.

Primary LanguageJavaScript

Primer Integration Walkthrough

Getting Started

Installation

$ git clone git@github.com:primer-io/integration-walkthrough.git
$ cd ./integration-walkthrough

Install the dependencies using yarn or npm.

# With yarn
$ yarn

# With npm
$ npm i

Set the environment variables

Grab your API Key, or create a new API Key, from Primer's dashboard.

Dashboard API Key

Clone env.example and name the cloned file .env.

$ cp env.example .env

Open .env and set the environment variable API_KEY with the API key available on your dashboard.

API_KEY=1234-1234-1234-1234 # Your Primer API Key

Run the server

# With yarn
$ yarn start

# With npm
$ npm start

The server is deployed on port 8880 by default. You can change the port by setting the PORT environment variable in the .env file.

Access the checkout

Check the checkout at http://localhost:8880/.

Checkout UI