Skip to content

Basis-Theory-Labs/pci-blueprint-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCI Blueprint Example

Payment Card Industry Data Security Standard (PCI DSS) are a set of compliance requirements that must be met in order to collect, store, and process cardholder data. To fully implement these requirements is both costly and time intensive.

The Basis Theory PCI Blueprint will provide you with a guide to meet 95% of the compliance requirements of PCI in as little as 5 minutes.

This example application has implemented Basis Theory Elements and Proxy

Create Environment variables

Create a .env.local file with your secrets

NEXT_PUBLIC_BASIS_THEORY_PUBLIC_KEY=
BASIS_THEORY_PRIVATE_KEY=

Copy the values you created for NEXT_PUBLIC_BASIS_THEORY_PUBLIC_KEY from Step 2.

Create a Public Application

To start, you'll need a new Public Application using our PCI compliant template Collect PCI Data to be able to securely collect cardholder data. Click here to create one.

Copy the API KEY to the .env.local file as the NEXT_PUBLIC_BASIS_THEORY_PUBLIC_KEY value.

Create a Private Application

Next, you need a new Private Application using our PCI compliant template Use PCI Tokens to be able to securely send cardholder data via the Basis Theory Proxy. Click here to create one.

Copy the API KEY to the .env.local file as the BASIS_THEORY_PRIVATE_KEY value.

Running

Run the development server:

npm run dev
# or
yarn dev

Key Integration Spots

File Description
pages/index.js Initialize Basis Theory Elements
pages/card-form.js Card form using CardElement and tokenizing the collected cardholder data
pages/api/proxy.js Outbound call to using Basis Theory Proxy