Documentation

Everything you need to integrate AI agent payments. From your first payment window to production deployment.

Quick Start

Get an AI agent making payments in under 5 minutes. Install the SDK, create a payment window, and make your first test transaction.

Step 1 — Install the SDK
terminal
npm install @denara/sdk
Step 2 — Create a Payment Window
agent.ts
import { Denara } from '@denara/sdk';

// Initialize with your API key
const denara = new Denara({
  apiKey: process.env.DENARA_API_KEY,
  environment: 'sandbox', // or 'production'
});

// Create a cryptographically signed payment window
const window = await denara.createPaymentWindow({
  amount: 500_00,          // $500.00 max spend
  currency: 'USD',
  ttl: 3600,               // expires in 1 hour
  merchant_categories: [   // restrict to these MCCs
    'cloud_computing',
    'software_services',
  ],
  metadata: {
    agent_id: 'agent-procurement-01',
    task: 'provision-gpu-cluster',
  },
});

// Get the virtual card for this window
const card = await denara.getCard(window.card_id);

console.log('Card number:', card.number);
console.log('Window expires:', window.expires_at);
console.log('Max spend:', window.amount / 100, 'USD');
Step 3 — Use the Card
purchase.ts
// The agent uses the virtual card at any Visa merchant
// Our authorization engine validates in <50ms:
//   ✓ Amount within window limit
//   ✓ Merchant category allowed
//   ✓ TTL not expired
//   ✓ Cryptographic signature valid

const purchase = await agent.purchaseCloudCompute({
  provider: 'aws',
  instance: 'p4d.24xlarge',
  hours: 4,
  payment: {
    card_number: card.number,
    expiry: card.expiry,
    cvv: card.cvv,
  },
});

// Check transaction status
const tx = await denara.getTransaction(purchase.tx_id);
console.log('Status:', tx.status);  // 'approved'
console.log('Amount:', tx.amount);  // 34400 ($344.00)

API Reference

Comprehensive guides and API references for every part of the Denara.ai platform.

Available

Getting Started

Set up your account, generate API keys, and make your first payment window in under 5 minutes.

Available

Payment Windows API

Create, sign, and manage cryptographic payment windows with amount limits, TTL, and merchant restrictions.

Available

Card Issuance

Issue virtual Visa cards programmatically. Configure spend limits, merchant categories, and expiration policies.

Coming Soon

Webhooks & Events

Real-time notifications for authorizations, settlements, declines, and window expirations.

Coming Soon

USDC Funding

Fund agent wallets with USDC on supported chains. Manage balances and view settlement reports.

Coming Soon

SDKs & Libraries

Official SDKs for TypeScript, Python, Go, and Rust. Plus OpenAPI spec for generating clients in any language.

Full documentation will be hosted on docs.denara.ai powered by Mintlify. Join the waitlist to get early access.

Ready to integrate?

Get your API keys and start building in our sandbox environment today.

Request API Access