GRO-607: Replace mock payment flow with real Stripe Elements
- Install @stripe/stripe-js and @stripe/react-stripe-js - Replace BillingPayments mock delay with real Stripe Elements: - Fetch publishableKey from GET /api/portal/config - Lazy load Stripe via loadStripe() - Wrap payment modal in <Elements> with PaymentElement - Use stripe.confirmPayment() with clientSecret from pay/pay-multiple endpoints - Support multi-invoice selection and single invoice payment - Add "Save card for future payments" checkbox (setup_future_usage) - Add payment method management: list saved cards, delete via DELETE endpoint - Proper error handling for payment failures - Autopay toggle (UI-only, Phase 2 backend pending) Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@groombook/types": "workspace:*",
|
||||
"@stripe/react-stripe-js": "^6.1.0",
|
||||
"@stripe/stripe-js": "^9.1.0",
|
||||
"@tailwindcss/vite": "^4.2.2",
|
||||
"better-auth": "^1.5.6",
|
||||
"lucide-react": "^0.577.0",
|
||||
|
||||
Reference in New Issue
Block a user