Stripe subscription billing
The subscription rail: three monthly lines billed through Stripe on a2ally's own account — scan monitoring, Publisher Pro and the anchor plan.
Stripe billing is dark: not armed. Missing dependencies: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRICE_SCAN_MONITORING, STRIPE_PRICE_PUBLISHER_PRO, STRIPE_PRICE_ANCHOR_PLAN. Charging is off and nothing is charged.
The lines
- Scan monitoring subscription — $9 per monitored skill per month · default payment method: card · founder eligible: no
- Publisher Pro — $49 per month · default payment method: us_bank_account · founder eligible: yes
- Anchor plan subscription — $99 per month · default payment method: us_bank_account · founder eligible: no
The ACH rule
ACH rule: subscription lines at $49 or more default to ACH — us_bank_account is sent first in payment_method_types, then link, then card. The $9 scan monitoring line defaults to card, then link. A stablecoin option is printed as a payer option only where enabled on a2ally's Stripe account; no stablecoin payment_method_type is ever sent to Stripe by this module.
The founder rule
Founder rule: an account may hold founder slots on at most 3 distinct fee features (the per-account cap in src/foundersrule.ts). Publisher Pro is a new subscription feature with 25 founder slots; a founder-exempt Publisher Pro subscription is recorded locally with amount 0 and no Stripe call is made. Scan monitoring and the anchor plan are not covered by founder slots.
The billing rule
Billing rule: POST /v1/stripe-billing/subscribe with the owner's account key subscribes the account to one line. Charging arms together with the rail: while billing is not armed, every subscribe — founder-exempt ones included — answers 503 stripe_billing_not_armed naming the missing dependencies, and nothing is stored or charged. When armed, a founder-exempt Publisher Pro subscribe is recorded locally at amount 0 with no Stripe call; any other subscribe gets-or-creates the account's Stripe customer and opens the subscription at the line's configured Stripe price, sealing ONE ledger receipt (kind activity.receipt) whose public payload carries no Stripe customer or subscription id — those stay only in the seal's private opening and the subscription record. Cancel at POST /v1/stripe-billing/subscriptions/{id}/cancel: a founder-exempt (local) record is canceled locally with no Stripe call; a Stripe record is set to cancel at period end through Stripe while armed.
Surfaces
- GET /v1/stripe-billing (free, no key) — this index document: armed state, missing dependency names, the three subscription lines, the ACH, founder and billing rules, and live usage counts
- GET /v1/stripe-billing/subscriptions (owner account key) — the caller's own subscriptions only
- POST /v1/stripe-billing/subscribe (owner account key) — subscribe the account to one line; founder-exempt Publisher Pro is recorded locally at amount 0, any other line opens a Stripe subscription when armed
- POST /v1/stripe-billing/subscriptions/{id}/cancel (owner account key) — cancel one of the caller's own subscriptions; another account's subscription reads 404
- GET /stripe-billing (page) and GET /stripe-billing.md — the human-readable twin of this document
Publisher settlement Publisher gateway For publishers Pricing
