Set up the SDK
North America—United States and Canada
Install the SDK
Use a package manager to download and install the SDK you want to use.
pip install ecommClover
yarn add clover-ecomm-sdk
Configure the SDK
To use the SDK, you'll need to configure it using the following values:
- Your test merchant's
access_token
retrieved from the OAuth flow. See Authenticate with OAuth—Canada and US. - Your test merchant's public key obtained using the [
pakms/apikey
] (https://docs.clover.com/reference/getapikey) endpoint)
Theaccess_token
is needed to initialize the SDK.
clover.access_token = "Bkk321..."
const clover = require('clover-ecomm-sdk')('Bkk312...');
The merchant's public key is required to tokenize the customer's card data.
clover.api_key = "fhjk1..."
const API_KEY = 'fhjk1...';
Set environment variables in Node
If your app is using the Node SDK, create a .env
file in your project root directory.
ACCESS_TOKEN={access_token}
API_KEY={api_key}
ENVIRONMENT=sandbox
NOTE
For your app in production environments, set the
ENVIRONMENT
asproduction
.
Updated about 1 month ago