Beta » Wallets track balances in tokens, credits, or dollars, automatically as they are used.Learn more
New » Metering turns raw usage events into billable quantities on a subscription.Learn more
/

Help Center › Getting Started › For AI Agents

Getting Started

For AI Agents New

Give your coding agent expert, always-current knowledge of the Maxio Advanced Billing API and SDKs, so it writes integrations that compile and work the first time.

Start here
Install the Maxio Context Plugin

Maxio Context Plugin

Your agent, fluent in Maxio Advanced Billing

Coding agents guess at APIs they have not seen. The Maxio Context Plugin removes the guessing: it installs skills and an SDK map of all 268 operations into Claude Code, Cursor or Codex, grounded in the typed SDKs generated from Maxio's OpenAPI definition. Your agent plans against the real contract and writes typed calls that compile.

You“Bill Lumen AI's tokens in tiers and show a projected invoice”
Context Pluginintegrate skill → plan + contract sheet
SDK map → exact signatures, wire names, error arms
Typed SDKclient.subscriptionComponents.createUsage({…})
ResultCompiles, passes tests, handles 422s and retries

SDK map, not memory

Every operation's signature, request fields (camelCase ↔ snake_case), return type and error arms, looked up instead of recalled.

Skills per language

TypeScript, Python and C#/.NET skills for auth, client set-up, calling endpoints, models, errors, resilience and testing.

Plan before code

The integrate skill has the agent write a contract sheet of every call it will make before it touches your project.

Always in sync

Generated from the same OpenAPI definition as the API reference and SDKs, so docs, SDKs and the agent never drift apart.

Install the Context Plugin

One command adds the Maxio plugin to your coding agent. Then ask in plain English; the right skill loads on its own.

$ npx context-plugins install \
    https://maxio-test-wp.pages.dev/__downloads/plugin.zip
✓ Maxio Advanced Billing plugin installed (TypeScript, Python, C# skills)

Or inside Claude Code: /plugin marketplace add <folder with the unzipped plugin> then /plugin install maxio-advanced-billing.

1
Install

Add the plugin to Claude Code, Cursor or Codex.

2
Ask

“Add metered billing for our API tokens with Maxio.” The integrate skill loads.

3
Plan

The agent writes a plan and contract sheet from the SDK map: every call, field and error it will handle.

4
Ship

Typed SDK code with Basic auth, retries, 422 handling and tests that fake the transport.

Sample apps built with the Context Plugin4 apps

Four working apps for the billing problems Maxio customers solve every day. A coding agent built each one with the Maxio Context Plugin installed. They call Maxio only through the typed TypeScript SDK, and a Wire drawer in every app shows each SDK call, its HTTP request and response, retries and error handling. They open on a sandbox site with sample data, so you can try them without an API key.

Meterline usage pulse: token usage across the billing period with tier ladder

Meterline

Usage-based billingPrepaid credits

Lumen AI bills its customers for API tokens in tiers, GPU-seconds through event-based billing, and prepaid credit packs. Meterline ingests usage, shows each customer's tier and credit burn-down, and previews the next invoice line by line.

SDK: createUsage bulkRecordEvents listUsages previewAllocations allocateComponent previewRenewal readSubscriptionEntitlements …

Shift plan change studio with proration timeline

Shift

Upgrades & downgradesProration

Northwind Analytics' customer success team changes plans, seats and add-ons with confidence. Shift previews every change first: a proration timeline and a before-and-after invoice. Then it applies the change, and handles coupons and scheduled cancellations to keep customers.

SDK: previewSubscriptionProductMigration migrateSubscriptionProduct previewAllocations allocateComponents applyCouponsToSubscription initiateDelayedCancellation …

Recover revenue-at-risk dashboard with dunning pipeline

Recover

DunningRevenue at risk

Brightdesk's collections cockpit. It shows each past-due account by stage, why the payment failed and the invoice's full history. From there the team can request a new card, retry the payment, record a payment made by check, or pause the subscription, all without leaving the app.

SDK: listSubscriptions listInvoices listInvoiceEvents sendRequestUpdatePaymentEmail retrySubscription recordPaymentForInvoice readMrr …

Groupwise enterprise org tree and consolidated invoice

Groupwise

B2B enterpriseConsolidated invoicing

Orbital Cloud bills enterprises that have many business units on one consolidated invoice. Groupwise draws each account's org tree, quotes new multi-entity deals with a proforma invoice before signup, manages group members and payers, and breaks down each consolidated invoice by segment.

SDK: listSubscriptionGroups previewSignupProformaInvoice signupWithSubscriptionGroup addSubscriptionToGroup listConsolidatedInvoiceSegments …

How the agent built these apps
  1. Installed the plugin: npx context-plugins install https://maxio-test-wp.pages.dev/__downloads/plugin.zip
  2. Loaded typescript-integrate-maxio-advanced-billing. Following it, the agent wrote maxio-plan.md with a contract sheet built from sdk-map.md and map/operations/*.md.
  3. Built the client once (ServerEnvironment.Us, site subdomain, Basic auth, retry policy) and routed every call through it.
  4. Used the models, error-handling and testing skills to write code for Maxio's 422 errors arrays, decode failures and on-by-default retries.
  5. Wrote a smoke test that calls every operation against a sandbox that answers in Maxio's wire format. The SDK's own schemas validate every response.

Prompts to try

With the plugin installed, paste one of these into your agent.

Create a Maxio subscription for an existing customer on the “growth-monthly” product, with 25 seats on the “seats” component and a 20% coupon. Handle 422 validation errors and show the messages to the user.

Every hour, send our API token counts to Maxio as metered usage in batches, without double-counting if a run is retried. Add tests that fake the HTTP transport.

Before a customer upgrades from Starter to Scale, preview the prorated charge with Maxio and show the amount. Apply the change only when they confirm.

List every past-due subscription with its open invoices and card on file, and email a request to update the payment method to those whose card has expired.