Credit card rail: TEST mode and the live-ready switch

The credit card rail runs card authorization-backed budgets on Stripe TEST mode only in this release. A live switch exists so its safeguards can be checked now, but it is off: no configuration turns live card money on in this build.

Status: TEST mode is Live; live mode is Release-gated.

The switch

CORE_CARD_RAIL_MODE is test (the default) or live. Any other value refuses boot. With test, nothing about the credit card rail changes.

A live-shaped Stripe key in plaintext in any environment variable refuses boot in either mode, naming the variable and never its value.

Payees verified while the core runs

Payees onboard at /payee/v1/destinations and verify their Stripe Connect account. The core must run the credit card rail for this: on the hosted entry that takes a real Stripe TEST secret key (STRIPE_SECRET_KEY, sk_test_…) and CORE_CARD_PAYEES, set together. There is no keyless simulator setting; without them a card destination answers 409 card_rail_not_configured. The credit card rail reads each payee's destination at stream open and again at every payout, so a payee verified while the core runs is paid without a restart. A payee that is registered but not verified is refused by name (payee_unverified), with nothing allocated; a payee with no destination is refused (payee_no_destination). Operator-configured payees in CORE_CARD_PAYEES keep routing as before.

CORE_CARD_PAYEE_VERIFICATION=strict (optional in TEST mode, required for live) removes the exemption for CORE_CARD_PAYEES, and re-reads each payee's Connect account before every settlement epoch, renewal and close. A payee that is no longer verified, or whose account cannot be read, gets no transfer: the payout is refused by name and stays owed until a later read verifies it.

A card payee with streams whose destination has stayed unverified for 7 days raises one payee_payout_held alert (scheduler duty card.payee-held). Nothing is moved or refunded; the value stays settleable for the payee.

Live-mode safeguards

CORE_CARD_RAIL_MODE=live requires all four. A missing one refuses boot with card_live_safeguard_missing, naming each missing safeguard:

SafeguardConfiguration
live_key_under_kekCORE_CARD_LIVE_SECRET_KEY_SEALED: the live secret key sealed under CORE_KEY_ENCRYPTION_KEY (never a plaintext key)
webhook_signaturesCORE_CARD_CONNECT_WEBHOOK_SECRET (whsec_…): every card webhook route verifies the Stripe signature and its timestamp. On a multi-tenant deployment the operator registers one Connect endpoint, POST /hooks/v1/connect; a verified account.updated is re-read and applied only in the tenant that holds the account, and the answer is always {"received": true}
payee_verificationCORE_CARD_PAYEE_VERIFICATION=strict
release_gateCORE_CARD_LIVE_RELEASE_GATE set to the exact acknowledgement phrase of the founder's release gate

With every safeguard present, boot still refuses with card_live_release_gated: live mode is ready but disabled until the founder's release gate and an amendment of the repository's TEST-only rule. The key is never logged, never placed in an error message and never placed in an event.