feat: Stripe checkout endpoint accepts priceId directly #218

Closed
pook wants to merge 2 commits from feat/stripe-checkout-endpoint into main
Owner

Summary

  • Updated POST /billing/checkout to accept { priceId: string } instead of { userId, plan, successUrl, cancelUrl }
  • Validates priceId starts with price_, returns 400 otherwise
  • Success/cancel URLs read from STRIPE_SUCCESS_URL and STRIPE_CANCEL_URL env vars
  • Returns { url: session.url } on success, 500 on Stripe errors
  • Added e2e test verifying 400 on missing/invalid priceId

Test plan

  • TypeScript compiles (no new errors)
  • E2e test covers 400 on missing priceId
  • E2e test covers 400 on invalid priceId prefix
  • Manual test with valid Stripe price ID against running API

Closes #135

## Summary - Updated `POST /billing/checkout` to accept `{ priceId: string }` instead of `{ userId, plan, successUrl, cancelUrl }` - Validates `priceId` starts with `price_`, returns 400 otherwise - Success/cancel URLs read from `STRIPE_SUCCESS_URL` and `STRIPE_CANCEL_URL` env vars - Returns `{ url: session.url }` on success, 500 on Stripe errors - Added e2e test verifying 400 on missing/invalid priceId ## Test plan - [x] TypeScript compiles (no new errors) - [x] E2e test covers 400 on missing priceId - [x] E2e test covers 400 on invalid priceId prefix - [ ] Manual test with valid Stripe price ID against running API Closes #135
Simplifies POST /billing/checkout to accept { priceId } instead of
{ userId, plan, successUrl, cancelUrl }. Validates priceId starts with
'price_', reads success/cancel URLs from env vars, and returns
{ url: session.url }. Adds e2e test for 400 on missing/invalid priceId.

Closes #135

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

Closed 2026-04-10 during pipeline triage.

Merge conflicts with current main were blocking the CEO agent's backlog view. Reopen / resubmit against current main if the work is still relevant — CEO now injects open issues/PRs into its prompt and avoids duplicating.

Closed 2026-04-10 during pipeline triage. Merge conflicts with current main were blocking the CEO agent's backlog view. Reopen / resubmit against current main if the work is still relevant — CEO now injects open issues/PRs into its prompt and avoids duplicating.
pook closed this pull request 2026-04-10 15:06:03 -04:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot!218
No description provided.