Billing & Payments
The NANDA node includes a complete billing infrastructure for monetizing agent services — subscriptions, usage metering, invoicing, revenue sharing, and the Universal Checkout Protocol (UCP). All monetary values use Nexartis Points (NP) as the internal unit of account.
Subscriptions
Plan-based subscriptions with 30-day billing cycles. The subscription fee is debited from the developer's NP wallet at creation time. Plan changes are prorated.
curl -X POST https://nanda.nexartis.com/api/subscriptions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer nanda_YOUR_KEY" \
-d '{
"keyId": "key_abc123",
"plan": "pro"
}' Subscription Lifecycle
- Create — Validates plan, checks NP balance, debits wallet, creates subscription
- Change plan — Computes prorated credit/charge for remaining period; upgrades debit the difference, downgrades credit back
- Cancel — Sets status to
cancelled, disables auto-renew - Auto-renew — Cron sweeps expired subscriptions and renews those with
autoRenew = trueand sufficient balance
Billing Periods & Metering
API usage is tracked per billing period. Each period has included calls based on the subscription tier, with overage charges for excess usage:
Period Lifecycle
Periods are open → closed. When a period closes, line items are
generated automatically (overage or base usage). Cron sweeps expired open periods.
Line Items
Categories: base (within-limit, zero cost) or overage (excess calls × overage rate in NP). Each line item includes quantity, unit price, and total.
Invoicing
Invoices are generated with sequential invoice numbers per tenant. Each invoice references a billing period and its line items:
# List invoices for a key
curl "https://nanda.nexartis.com/api/invoices?keyId=key_abc123" \
-H "Authorization: Bearer nanda_YOUR_KEY" Revenue Sharing
Revenue from agent API calls is split between agent developers and the platform. Splits are configurable per agent. Track developer earnings via the developer portal:
curl "https://nanda.nexartis.com/api/developer/earnings" \
-H "Authorization: Bearer nanda_YOUR_KEY" Multi-Currency & Wallets
Built-in currency table with configurable exchange rates. Multi-currency wallets track balances per agent. Use MCP tools for currency operations:
nanda_get_exchange_rates— Query current ratesnanda_get_wallet_balance— Check multi-currency balancesnanda_convert_currency— Convert between currencies
Universal Checkout Protocol (UCP)
The UCP provides a standardized checkout flow for agent-to-agent payments. Create checkout
sessions via POST /api/ucp/checkout-sessions that can be settled across currencies
and payment methods. Sessions are stored in the ucp_checkout_sessions table.
API Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/subscriptions | Create subscription |
| GET | /api/subscriptions?keyId= | Get active subscription |
| DELETE | /api/subscriptions/:id | Cancel subscription |
| PATCH | /api/subscriptions/:id/change | Change plan (prorated) |
| POST | /api/invoices | Generate invoice |
| GET | /api/invoices?keyId= | List invoices |
| POST | /api/admin/billing/close-period | Close a billing period |
| GET | /api/developer/earnings | Developer earnings |
| POST | /api/ucp/checkout-sessions | Create UCP checkout session |
| GET | /api/payments | Currency & exchange rates |