Credentials & Setup

Complete every step below before making your first live API call. ---

Required Credentials

You will receive three credentials from Centiwise when your merchant account is activated:

CredentialDescription
endpoint_idUnique identifier for your merchant endpoint. Used in the API URL path.
merchant_loginYour Centiwise merchant username. Used as the OAuth consumer key.
merchant_control_keySecret key used to generate the control hash signature on Payin requests.
⚠️

Security rule: These credentials must never appear in client-side code, browser requests, public repositories, or application logs.


Environment Variable Setup

Store credentials as environment variables. This keeps them out of your source code and makes them easy to rotate.

Login=your_username_cw
CENTIWISE_ENDPOINT_ID=your_endpoint_id
CENTIWISE_LOGIN=your_merchant_login
CENTIWISE_CONTROL_KEY=your_control_key

Load them in your application:

Node.js

// Using dotenv
require('dotenv').config();

const endpointId   = process.env.CENTIWISE_ENDPOINT_ID;
const login        = process.env.CENTIWISE_LOGIN;
const controlKey   = process.env.CENTIWISE_CONTROL_KEY;

Python

import os
from dotenv import load_dotenv

load_dotenv()

endpoint_id   = os.getenv("CENTIWISE_ENDPOINT_ID")
login         = os.getenv("CENTIWISE_LOGIN")
control_key   = os.getenv("CENTIWISE_CONTROL_KEY")

Recommended: Use a Secrets Manager

For production deployments, use a dedicated secrets manager instead of .env files:

PlatformService
AWSAWS Secrets Manager
Google CloudSecret Manager
AzureAzure Key Vault
Self-hostedHashiCorp Vault

Credential Rotation

  • Rotate your merchant_control_key immediately if you suspect it has been exposed
  • After rotation, update all deployments before the old key is revoked
  • Contact your Centiwise account manager to initiate a key rotation


Did this page help you?