/** * Billing gate for paid provisioning — the portable half. * * hq-pro enforces billing server-side: a provision call for a resource whose * payer has no usable card returns `402` with a `billing` payload carrying a * `setup` action that names EXACTLY which checkout endpoint to hit. That endpoint * returns `{ url }` — a Stripe-hosted card-capture link. * * This module holds the parts with no terminal in them: the prices, the * formatter, and the link mint. The prose that talks to a human (confirm a * charge, explain a decline) lives in `./cli-billing.ts`, so a Next.js consumer * can render the same facts in its own UI without inheriting `chalk` or * `process.exit`. * * Prices mirror hq-console's authoritative constants (`src/lib/billing-pricing.ts`): * amounts are in the smallest currency unit (US cents) to match Stripe's wire shape. */ import type { OutpostTokenSource } from "./client.js"; import type { OutpostTransport } from "./transport.js"; import type { BillingSetupAction } from "./types.js"; /** Per-Agent monthly list price, in cents ($100.00 / agent / month). */ export declare const AGENT_PRICE_CENTS = 10000; /** Per-Outpost monthly list price, in cents ($80.00 / Outpost / month). */ export declare const OUTPOST_PRICE_CENTS = 8000; /** A resource whose provisioning incurs a recurring charge. */ export type PaidResource = "agent" | "Outpost"; /** Render a cents amount as a `$X.YZ` USD string. */ export declare function formatUsd(cents: number): string; /** * Mint a Stripe-hosted card-capture link for a {@link BillingSetupAction}. * Returns the hosted URL the payer opens to add or replace a card. * * Throws on a non-2xx — the caller decides how to surface it. Never swallows. */ export declare function mintPaymentLink(options: { transport: OutpostTransport; token: OutpostTokenSource; setup: BillingSetupAction; baseUrl?: string; }): Promise; //# sourceMappingURL=billing.d.ts.map