> Quick Start

Payment infrastructure for AI agents. Go from zero to first mandate in 5 minutes.

mandate_request

An authorization request sent to a user. Contains amount and a validity window. Returns an approval URL for user consent via passkey.

ephemeral_card

A short-lived virtual Visa card issued on demand. Default 5-minute TTL, single-use, auto-destroyed after authorization.

passkey

Hardware-backed user authentication. FaceID, TouchID, or Windows Hello. Cryptographically bound to attesso.com.

fee_modes

Two modes: markup (default) adds fees on top, inclusive deducts fees from amount. Preview endpoint available.

1. Install

terminal
npm install @attesso/sdk
# or
pnpm add @attesso/sdk

2. Initialize

server.ts
import { AttessoClient } from '@attesso/sdk';

const attesso = new AttessoClient({
  apiKey: process.env.ATTESSO_API_KEY  // rk_test_...
});

3. Create a Mandate Request

Your agent creates a mandate request. The user approves via passkey (FaceID/TouchID). Their payment method is charged immediately.

server.ts
const request = await attesso.createMandateRequest({
  externalUserId: 'user_123',     // your user identifier
  amount: 50000,                   // $500 in cents
  validityWindow: '24h',           // request expires in 24 hours
});

// Send the approval URL to your user
console.log('Approve at:', request.approvalUrl);
// User authenticates with FaceID/TouchID (WebAuthn passkey)

4. Poll for Approval

server.ts
const status = await attesso.getMandateRequest(request.id);

if (status.status === 'approved') {
  console.log('Mandate ID:', status.mandate.id);
  console.log('Spending limit:', status.spendingLimit);  // amount minus fees
}

5. Issue a Card

When your agent is ready to make a purchase, issue an ephemeral virtual card.

server.ts
const card = await attesso.issueCard(status.mandate.id, {
  amount: 34700,       // $347.00
  ttlSeconds: 300,     // 5 min TTL
});

console.log(card.number);    // '4242...'
console.log(card.cvc);       // '123'
console.log(card.expMonth);  // 3
console.log(card.expYear);   // 2026
// Use at merchant checkout. Auto-captured. Card destroyed after use.

1% platform fee + Stripe processing at cost. Optional developer fee (0-5%).Pricing →

What's Next

Questions? Reach out at info@attesso.com