Skip to content

Conversation

@ericokuma
Copy link
Contributor

This PR implements Stripe Checkout integration to provide a modern and clear payment experience, addressing the issues with the previous Stripe Billing Portal page (APP-706).

Why:
The existing payment flow lacked clear pricing information and required multiple steps to enter payment and billing details. By integrating Stripe Checkout, we aim to offer a streamlined, "Lovable-style" payment page with upfront plan details and diverse payment options.

What:

  • Backend:
    • Added a new CreateCheckoutSession method to the payment provider interface and its Stripe implementation.
    • Implemented a webhook handler for checkout.session.completed to process payment method and billing address updates.
    • Exposed a new API endpoint POST /v1/orgs/{org}/billing/payments/checkout-session to create these sessions.
    • Updated proto definitions and regenerated code.
  • Frontend:
    • Modified all relevant entry points (StartTeamPlanDialog, /billing/upgrade route, /upgrade-callback error link, Payment.svelte "Manage" button, BillingCTAHandler) to redirect users to the new Stripe Checkout session URL when payment is required or an upgrade is initiated.

Benefits:

  • Users will now encounter Stripe's modern, customizable Checkout UI.
  • Supports multiple payment methods (e.g., Card, Amazon Pay, Cash App Pay) based on Stripe dashboard configuration.
  • Billing address collection is integrated into the checkout flow.
  • Provides a clearer, more intuitive path for users to resolve payment issues or upgrade their plan.

Important Note: To enable various payment methods (Amazon Pay, Cash App Pay, etc.), they must be configured and activated in your Stripe Dashboard under Settings → Payments → Payment methods.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Linear Issue: APP-706

Open in Cursor Open in Web

- Add CreateCheckoutSession to payment provider interface
- Implement Stripe Checkout session creation with billing address collection
- Add API endpoint for creating checkout sessions (/v1/orgs/{org}/billing/payments/checkout-session)
- Handle checkout.session.completed webhook events
- Update frontend to use Checkout for payment issues:
  - StartTeamPlanDialog
  - Payment.svelte (manage button)
  - BillingCTAHandler
  - upgrade-callback page
  - billing/upgrade route

This provides a better UX similar to Lovable's payment page with:
- Multiple payment method options (cards, Amazon Pay, Cash App Pay, etc.)
- Integrated billing address collection
- Quick checkout flow

Resolves APP-706

Co-authored-by: eric.okuma <eric.okuma@rilldata.com>
@cursor
Copy link

cursor bot commented Feb 3, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

cursoragent and others added 4 commits February 3, 2026 17:47
…ling

- Remove invalid PaymentMethodCollection parameter for setup mode
- Add Currency parameter required for setup mode
- Add logging for checkout session creation errors
- Add fallback to billing portal if checkout fails
- Add try-catch error handling in StartTeamPlanDialog
- Show user-friendly error notifications on failure

This should fix the loading hang when clicking upgrade.

Co-authored-by: eric.okuma <eric.okuma@rilldata.com>
- Create new payment page at /[org]/-/settings/billing/payment
- Show Team plan pricing (50/month, 10GB included, 5/GB extra)
- Display payment/billing requirements status (checkmarks/X)
- Show accepted payment methods
- Add 'Continue to payment' button that opens Stripe Checkout
- Update all entry points to redirect to this page:
  - StartTeamPlanDialog
  - BillingCTAHandler
  - Payment.svelte
  - billing/upgrade route
  - upgrade-callback page

This provides better context about pricing before going to Stripe Checkout.

Co-authored-by: eric.okuma <eric.okuma@rilldata.com>
Reverting to use Stripe Checkout directly with pricing information instead.

Co-authored-by: eric.okuma <eric.okuma@rilldata.com>
Added custom text message to Stripe Checkout showing Team Plan pricing:
- $250/month base price
- 10 GB included
- $25/GB additional
- Unlimited projects & users

Note: For the full Lovable-style checkout with pricing UI, line items,
and subscription details, Stripe Checkout would need to use 'subscription'
mode with a Stripe Price ID instead of 'setup' mode.

Co-authored-by: eric.okuma <eric.okuma@rilldata.com>
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.

2 participants