Stripe Inline Payment Plan
Short, actionable notes for implementing Stripe inline flow inside ValorIDE and ValkyrAI services.
High-level
- Use Stripe Checkout or Payment Intents depending on flow
- Keep sensitive keys server-side (never expose secret keys to webviews)
- Use webhook endpoints for asynchronous confirmation and reconciliation
Quickstart (server)
- Create PaymentIntent via backend API with amount and currency
- Return clientSecret to client
- Use Stripe.js or SDK inside the web UI to confirm card
- Persist charge and reconcile in billing records
Webhooks
- Implement idempotency, verify signatures, and reconcile asynchronously
Tips
- For inline/in-app purchases, prefer short-lived client secrets and server-side validation
- Use the Billing API to attach charges to accounts and update credits
See also: Monetization Quick Start