Skip to main content

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)

  1. Create PaymentIntent via backend API with amount and currency
  2. Return clientSecret to client
  3. Use Stripe.js or SDK inside the web UI to confirm card
  4. 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