This repository contains an example implementation of the SimpleCheckout SDK, serving as a playground and reference for integration.
The SimpleCheckout Playground is a client-facing application where you can test credit card tokenization and interact with the CreditCardForm and CVCVerificationForm components using sandbox API keys.
It demonstrates how to integrate simplecheckout-sdk into a web application.
- Node.js (v16 or higher recommended)
- npm or yarn
-
Clone the repository:
git clone https://github.com/Fewsats/simplecheckout-playground.git cd simplecheckout-playground -
Install dependencies:
npm install
Start the development server:
npm run devThe application will be available at http://localhost:3001 (or another port if 3001 is busy).
Navigate to http://localhost:3001/ to test the credit card tokenization flow.
- Enter your Publishable Key and Customer ID (sandbox credentials).
- Click Initialize Form.
- Fill in the credit card details and email.
- Submit to receive a token.
Navigate to http://localhost:3001/account.html to test connecting user accounts.
- Enter your Publishable Key and Customer ID.
- Select a Login Source (fetched automatically when key is entered).
- Click Initialize Account Form.
- Enter credentials to connect the account.
Both pages accept URL parameters, which is convenient for debugging—bookmark a link with your credentials pre-filled:
Credit Card Tokenization:
http://localhost:3001/?publishable_key=pk_sandbox_xxx&customer_id=your-customer-uuid
Account Connection:
http://localhost:3001/account.html?publishable_key=pk_sandbox_xxx&customer_id=your-customer-uuid&login_source_id=your-login-source-uuid
For full SDK documentation, please refer to the SimpleCheckout Documentation.