chore: sync test with main (api#878 sessions + claim)
Merged
RE
3mo ago+2989+2989+0123456789012345678901234567890123456789-217-217-012345678901234567890123456789
Summary
- Merges
mainintotestsotest-recoup-api.vercel.apppicks up optional-authPOST /api/subscriptions/sessions+ claim from api#878 (and the earlier #877/#876 plan/lifecycle work). - Unblocks marketing preview testing that posts
{ plan, successUrl, cancelUrl }against the test API.
Test plan
- CI green on this PR
- After merge,
POST https://test-recoup-api.vercel.app/api/subscriptions/sessionswith{plan,successUrl,cancelUrl}returns 200 + Stripe URL (not 400 unrecognized keys)
Made with Cursor
Summary by cubic
Merges main into test so the test environment picks up the plan-gating and checkout work from #877/#878. POST /api/subscriptions/sessions now accepts { plan, successUrl, cancelUrl } with auth optional (it previously required auth and rejected unrecognized keys), and new POST /api/subscriptions/claim attaches a subscription bought anonymously to an authenticated account.
Notes
- Also brings in plan entitlements with a 402
plan_limittask gate, the abandoned-checkout follow-up email, and anonymous checkout webhooks. - After merge,
POST https://test-recoup-api.vercel.app/api/subscriptions/sessionswith{ plan, successUrl, cancelUrl }should return 200 with a Stripe URL.