Skip to content

CONV-245: Add subscription checkout route#214

Merged
menvil merged 1 commit into
developfrom
feature/CONV-245-add-subscription-checkout-route
Jun 2, 2026
Merged

CONV-245: Add subscription checkout route#214
menvil merged 1 commit into
developfrom
feature/CONV-245-add-subscription-checkout-route

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Added POST /billing/checkout/{plan} route → StartSubscriptionCheckoutController
  • Controller validates plan key (404 for unknown, 422 for free), delegates to BillingPaymentService, redirects to checkout URL
  • Added billing.success and billing.cancel named routes with minimal views (CONV-246 pre-included, needed for route() resolution in controller)
  • No direct Cashier calls in controller — all goes through BillingPaymentService

Test plan

  • Guest redirected to /login
  • Auth user redirected to checkout URL (via fake gateway)
  • Unknown plan returns 404
  • Free plan returns 422
  • composer test passes (441 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Adds subscription checkout flow with a new POST /billing/checkout/{plan} route that starts checkout and redirects to the payment gateway. Implements CONV-245 and wires the required success/cancel callbacks.

  • New Features
    • Added POST /billing/checkout/{plan} (named billing.checkout), auth-only; redirects to the gateway checkout URL.
    • Controller validates plan (404 unknown, 422 free), delegates to BillingPaymentService, and uses billing.success/billing.cancel routes for return URLs.
    • Added minimal billing.success and billing.cancel views/routes; tests cover auth, redirect via fake gateway, and unknown/free plan errors.

Written for commit fee63bf. Summary will update on new commits.

Review in cubic

Also adds billing success/cancel routes and minimal views
(CONV-246 scope pre-included to support route() resolution in controller).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit 85fd6fc into develop Jun 2, 2026
@menvil menvil deleted the feature/CONV-245-add-subscription-checkout-route branch June 2, 2026 14:42
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0ca96218-afe6-40de-aed8-cfbc8e006278

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-245-add-subscription-checkout-route

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant