JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 51
  • Score
    100M100P100Q62184F
  • License MIT

One-line micropayment integration for AI agents - Express, Cloudflare Workers, Vercel Edge

Package Exports

  • @agenttoll/sdk
  • @agenttoll/sdk/edge
  • @agenttoll/sdk/next
  • @agenttoll/sdk/tool

Readme

AgentToll SDK

One-line micropayment integration for AI agents.

Installation

npm install @agenttoll/sdk

From GitHub (if npm is unavailable)

npm install github:agenttoll/sdk

Direct download

Copy tollbooth.js into your project.

Usage

Express

import tollbooth from '@agenttoll/sdk';
// or if installed locally:
// import tollbooth from './tollbooth.js';

app.use(tollbooth('pk_live_xxx'));

Cloudflare Workers

import { tollgate } from '@agenttoll/sdk/edge';

export default tollgate('pk_live_xxx', { amount: 0.005 });

Agent Tool (for AI agents)

import { payTollTool } from '@agenttoll/sdk/tool';

// Add to your agent's tools
tools: [payTollTool]

API Reference

See https://agenttoll.io/docs for full documentation.