$WHAT IS KONTEXT
Payment Control Plane SDK for modern fintech. 8-stage lifecycle tracks every payment from intent to reconciliation. Policy engine with OFAC screening. 6 provider adapters. Zero dependencies.
$INTEGRATE IN 3 STEPS
- 1.
npm install kontext-sdk - 2.
Kontext.init({ projectId: '...', environment: '...' }) - 3.
await ctx.start({ ... }) + await ctx.authorize(attemptId, { ... })
$DEFAULT FLOW: TREASURY PAYMENT
// 1. Start a payment attempt
const attempt = await ctx.start({
workspaceRef: 'acme-treasury',
appRef: 'treasury-agent',
archetype: 'treasury',
intentCurrency: 'USD',
settlementAsset: 'USDC',
chain: 'base',
senderRefs: { wallet: '0xTreasury...abc' },
recipientRefs: { wallet: '0xVendor...def' },
executionSurface: 'sdk',
});
// 2. Authorize — policy engine runs
const { receipt } = await ctx.authorize(attempt.attemptId, {
chain: 'base', token: 'USDC', amount: '5000',
from: '0xTreasury...abc', to: '0xVendor...def',
actorId: 'treasury-agent',
});
// 3. Broadcast + confirm
if (receipt.allowed) {
await ctx.broadcast(attempt.attemptId, txHash, 'base');
await ctx.confirm(attempt.attemptId, { txHash, blockNumber });
}$PAYMENT PRESETS (WORKSPACE PROFILES)
$SUPPORTED CHAINS (Base free)
$6 PROVIDER ADAPTERS
● EVMAdapter
● SolanaAdapter
● CircleAdapter
● X402Adapter
● BridgeAdapter
● ModernTreasuryAdapter
$START INPUT SCHEMA
interface StartAttemptInput {
workspaceRef: string;
appRef: string;
archetype: 'micropayments' | 'treasury' | 'invoicing' | 'payroll' | 'cross_border';
intentCurrency: string;
settlementAsset: string;
chain: 'base' | 'ethereum' | 'solana';
senderRefs: { wallet: string };
recipientRefs: { wallet: string };
executionSurface: 'sdk' | 'api' | 'cli';
metadata?: Record<string, unknown>;
}$AUTHORIZE OUTPUT SCHEMA
interface PaymentReceipt {
decision: 'allow' | 'block' | 'review';
allowed: boolean;
checksRun: Array<{ name: string; passed: boolean; severity?: string }>;
violations: Array<{ code: string; severity: string }>;
requiredActions: Array<{ code: string; message: string }>;
digestProof: { valid: boolean; chainLength: number };
}$MACHINE-READABLE ENDPOINTS
LLM guide ···· https://getkontext.com/llms.txt
npm ·········· https://npmjs.com/package/kontext-sdk
GitHub ······· https://github.com/Legaci-Labs/kontext