Authentication

All Payments Central API requests are authenticated using API keys passed as Bearer tokens.

API keys

Payments Central uses API keys to authenticate requests. Every API key belongs to a merchant account and carries a set of scopes that restrict what it can do.

Key prefix Environment Real money Cost
pc_test_ Sandbox (UAT) No Free
pc_live_ Production Yes Transaction fees apply

Sending the API key

Include your API key in the Authorization header on every request:

Authorization: Bearer pc_test_YOUR_KEY

Example with curl:

curl https://api.uat.payments-central.com/api/v1/transactions \
  -H "Authorization: Bearer pc_test_YOUR_KEY"
Never send keys in URLs Don't include API keys in query parameters or URLs — they appear in server logs and browser history. Always use the Authorization header.

Creating a key

  1. Log in to core.payments-central.com
  2. Go to Settings → API Keys → Create key
  3. Give it a descriptive name (e.g. Backend service — production)
  4. Choose the environment (sandbox or production)
  5. Select the required scopes (see below)
  6. Copy the key immediately — it won't be shown again

Scopes

Scopes limit what an API key can do. Follow the principle of least privilege: grant only the scopes your integration needs.

ScopeAllows
transactions:writeCreate charges and refunds
transactions:readList and retrieve transaction details
ledger:readRead accounts, journal entries, trial balance
ledger:writeCreate accounts and manual journal entries
fraud:evaluateCall the fraud evaluation endpoint
webhooks:manageConfigure webhook endpoints
sandboxSandbox access (automatically set for pc_test_ keys)

Key rotation

Rotate keys regularly and whenever you suspect a key may be compromised. Payments Central supports zero-downtime rotation:

  1. Create a new key from the dashboard
  2. Deploy your application with the new key
  3. Revoke the old key from the dashboard once traffic has shifted

Revoked keys return 401 Unauthorized immediately on all requests.

Storing keys securely

Best practices for API key storage:

Server-side only API keys must only be used in server-side code. Never embed them in frontend JavaScript, mobile apps, or any code that runs on a client device.

Authentication errors

If authentication fails, you'll receive a 401 Unauthorized response:

{
  "error": "unauthorized",
  "details": "Invalid or missing API key"
}

Common causes: