Quickstart

Create your first payment in under 5 minutes using the Payments Central sandbox.

Free sandbox access The sandbox (UAT) environment is free per board policy. No credit card or approval required. Sandbox API keys start with pc_test_.

1. Create an account

Sign up at core.payments-central.com. Your account is created with a sandbox (UAT) environment already configured.

2. Generate a sandbox API key

In the dashboard:

  1. Go to Settings → API Keys
  2. Click Create key
  3. Enter a name (e.g. My Dev Key), leave scope as sandbox
  4. Copy the key shown — it will not be shown again
Store your key securely Treat API keys like passwords. Never commit them to source control. Use environment variables.

3. Make your first API call

Create a charge using POST /api/v1/transactions. The sandbox accepts any card gateway — no real money moves.

curl -X POST https://api.uat.payments-central.com/api/v1/transactions \
  -H "Authorization: Bearer pc_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "amount": 4999,
    "currency": "USD",
    "gateway": "stripe",
    "merchant_ref": "order-8821",
    "description": "Pro plan subscription"
  }'

A successful response looks like:

{
  "id": "txn_01HXYZ123456",
  "merchant_id": "mer_01ABCDEF",
  "status": "captured",
  "amount": 4999,
  "currency": "USD",
  "gateway": "stripe",
  "merchant_ref": "order-8821",
  "description": "Pro plan subscription",
  "created_at": "2026-05-12T10:00:00Z",
  "updated_at": "2026-05-12T10:00:01Z"
}

4. Node.js example

const response = await fetch(
  'https://api.uat.payments-central.com/api/v1/transactions',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.PC_API_KEY}`,
      'Content-Type': 'application/json',
      'Idempotency-Key': crypto.randomUUID(),
    },
    body: JSON.stringify({
      amount: 4999,       // $49.99 in cents
      currency: 'USD',
      gateway: 'stripe',
      merchant_ref: 'order-8821',
      description: 'Pro plan subscription',
    }),
  }
);

if (!response.ok) {
  const err = await response.json();
  throw new Error(`Payment failed: ${err.error} — ${err.details}`);
}

const transaction = await response.json();
console.log('Transaction created:', transaction.id, transaction.status);

5. Python example

import os, uuid, requests

resp = requests.post(
    "https://api.uat.payments-central.com/api/v1/transactions",
    headers={
        "Authorization": f"Bearer {os.environ['PC_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "amount": 4999,
        "currency": "USD",
        "gateway": "stripe",
        "merchant_ref": "order-8821",
        "description": "Pro plan subscription",
    },
)
resp.raise_for_status()
transaction = resp.json()
print(f"Transaction {transaction['id']}: {transaction['status']}")

6. Go live

When you are ready to accept real payments:

  1. Generate a production API key (pc_live_) from the dashboard
  2. Change the base URL to https://api.payments-central.com
  3. Update your environment variable — no other code changes needed
Tip Store PC_API_KEY and PC_BASE_URL as environment variables. Set PC_BASE_URL=https://api.uat.payments-central.com in development and PC_BASE_URL=https://api.payments-central.com in production.

Next steps