Payment providers
The Stripe and manual adapters, the webhook, and test payments.
Route: /dashboard/platform/payment-providers. Needs canManagePayments.
Setup creates two providers: Stripe (pp_stripe) for cards and Manual for cash or comps at the door. The adapters live in features/integrations/payment.
Stripe
- Set
NEXT_PUBLIC_STRIPE_KEYandSTRIPE_SECRET_KEY. - Create a webhook endpoint in Stripe at
https://your-host/api/integrations/payment/pp_stripe/webhookwithpayment_intent.succeeded,payment_intent.payment_failed,payment_intent.canceled,charge.refundedandrefund.updated. - Put the endpoint's signing secret in
STRIPE_WEBHOOK_SECRET.
The webhook verifies the signature, stores each event once in PaymentWebhookEvent, and completes or fails the matching checkout. Refunds go back through the provider that took the payment, with a stable idempotency key.
Use test keys and the card 4242 4242 4242 4242 until a test purchase and refund both work.