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:
| Credential | Description |
|---|---|
endpoint_id | Unique identifier for your merchant endpoint. Used in the API URL path. |
merchant_login | Your Centiwise merchant username. Used as the OAuth consumer key. |
merchant_control_key | Secret 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_keyLoad 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:
| Platform | Service |
|---|---|
| AWS | AWS Secrets Manager |
| Google Cloud | Secret Manager |
| Azure | Azure Key Vault |
| Self-hosted | HashiCorp Vault |
Credential Rotation
- Rotate your
merchant_control_keyimmediately 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
Updated 5 months ago
Did this page help you?
