v431 - Checkout URL readiness and success/cancel route scaffold
Decision
Reviewed v430 Stripe checkout audit and locked-test result review bundle and proceeded with the condensed v431 checkout URL readiness bundle before payment collection, customer portal sessions, hard billing gates, broker distribution limits, owned portal rules, or internal load-board access.
What changed
- Added safe Workspace Billing return pages:
/billing/checkout/success and /billing/checkout/cancel.
- Updated the guarded Stripe Checkout test-session scaffold to use those return paths for future test checkout sessions.
- Added Super Admin-only checkout URL readiness review API:
/api/admin/stripe-checkout/url-readiness.
- Added a new
/admin/subscriptions Checkout URL readiness panel.
- Super Admin can review success/cancel route readiness, checkout URL return flag state, locked test-session history, URL withheld/returned counts, and payment/customer-portal guardrails.
- Added approve/revoke audit notes using
STRIPE_CHECKOUT_URL_RETURN_READINESS_UPDATED.
- Extended checkout-preparation and Workspace Billing review data to show the safe return-route scaffold.
- Added return-route review flags to
.env.example.
Guardrails
- Checkout URL return remains off by default.
- Payment collection remains off.
- Customer portal sessions remain off.
- Success/cancel pages do not update subscription status.
- Webhook subscription sync is not activated.
- Hard billing gates, broker distribution limits, owned portal rules, and internal load-board access are unchanged.
Prisma schema impact
None.