Aller au contenu
agentsub
Esc
↑↓naviguer↵ouvrir⌘Japerçu
Sur cette page

TypeScript SDK

Use the repository SDK to make authenticated gateway requests and build merchant payment challenges.

The workspace package @agentsub/sdk exports AgentsubClient, AcceptorClient, payment challenge helpers, money conversion utilities and provider interfaces. It is a repository workspace package; public npm publication is not asserted.

import { AgentsubClient } from '@agentsub/sdk';

const client = new AgentsubClient('https://api.agentsub.dev', accessToken);
const balance = await client.request('/v1/balance');

Obtain accessToken through the configured authentication flow and keep it out of logs. AgentsubClient adds the Bearer header and preserves a supplied idempotency key. AcceptorClient exposes capture and release operations. createPaymentChallenge describes supported rails and converts decimal dollar prices to integer microcredits.

Gateway contract · CLI · MCP.