A2A — Billing
The billing method namespace exposes wallet balance information and transaction history. Actual credit top-up (adding money via Stripe) is handled through the Dashboard UI or Stripe's API directly — the A2A billing methods are read-only for the current release.
Methods
billing.balance
Returns the current wallet balance.
Params: none
Returns:
{
"balance_credits": 8432,
"balance_usd_cents": 8432,
"currency": "USD"
}
billing.transactions.list
Lists credit transactions (top-ups and deductions) for the workspace.
Params:
| Param | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max transactions to return. Default 50, max 200. |
before | string | no | Cursor for pagination (transaction ID) |
Returns: Array of transaction objects:
[
{
"id": "txn_abc123",
"type": "topup",
"amount_credits": 5000,
"description": "Stripe charge via dashboard",
"created_at": "2026-07-15T12:00:00Z"
},
{
"id": "txn_xyz789",
"type": "deduction",
"amount_credits": -42,
"description": "Inference: openai/gpt-4o-mini (32 requests)",
"created_at": "2026-07-15T14:30:00Z"
}
]
billing.stripe.portal
Generates a one-time URL to the Stripe Customer Portal, where users can manage payment methods, view invoices, and update billing details.
Params: { "return_url": "https://your-app.com/billing" }
Returns: { "url": "https://billing.stripe.com/session/..." }
Programmatic credit top-up via Stripe API and spend limit configuration via the billing API are being added.