One contract.
Four ways to connect.

HTTP, Node / TypeScript, a terminal, or a local MCP client. Same amount, same currency, same status evidence.

Developer tools are in development. Examples below are contract previews, not published packages.

Your stack. Your way in.

One payment request, four interfaces. Explore the integration contract.

Integration preview

CLI example

# Private local workspace · run npm run build:all first
# Set KHPAYMENT_BASE_URL and KHPAYMENT_API_KEY privately.
node packages/cli/dist/index.js payments create \
  --amount '12.50' --currency 'USD' \
  --idempotency-key example-order-001 --json
Preview only · no bank request is madeRead CLI guide

MCP example

# Private local stdio: node packages/mcp/dist/index.js
# Set KHPAYMENT_BASE_URL and KHPAYMENT_API_KEY in the host environment.
# Send this tool call through a host with human confirmation.
# Live creation is disabled by default; test payments are simulated.
{
  "name": "create_payment",
  "arguments": {
    "amount": "12.50",
    "currency": "USD",
    "idempotencyKey": "example-order-001"
  }
}
Preview only · no bank request is madeRead MCP guide

SDK example

// Private local Node workspace · run npm run build:all first
// Server-side only; set both environment variables privately.
import { createClient } from 'khpayment-sdk';
const client = createClient({
  baseUrl: process.env.KHPAYMENT_BASE_URL,
  apiKey: process.env.KHPAYMENT_API_KEY,
});
const payment = await client.createPayment({
  "amount": "12.50",
  "currency": "USD"
}, {
  idempotencyKey: 'example-order-001',
});
console.log(JSON.stringify(payment));
Preview only · no bank request is madeRead SDK guide

API example

# Local development API · public access remains gated
# Set KHPAYMENT_API_KEY privately; use a test key for simulations.
curl --fail-with-body --silent --show-error 'https://khpayment-dev.161-118-223-128.sslip.io/api/v1/payments' \
  -H "Authorization: Bearer $KHPAYMENT_API_KEY" \
  -H 'Idempotency-Key: example-order-001' \
  -H 'Content-Type: application/json' \
  --data '{"amount":"12.50","currency":"USD"}'
Preview only · no bank request is madeRead API guide