Payment providers

Manual and Stripe adapters, webhooks, and the integrations page.

Adapters live in features/integrations/payment. A PaymentProvider record has name, code, adapter (manual or stripe), isInstalled, isDefault, and config.

Manual

No credentials. Desk checkout, recorded deposits, and gift-card sales use the installed manual provider. A payment records tender taken at the desk.

Stripe

Needs STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET. Point the webhook at:

/api/payments/webhooks/pp_stripe

The route accepts only an installed Stripe provider, verifies the signature, logs each event once in PaymentWebhookEvent, rejects amount or currency mismatches, and handles:

  • checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed, checkout.session.expired (card pages for deposits, desk card, gift cards and memberships)
  • invoice.paid (membership renewals)
  • payment_intent.succeeded, payment_intent.payment_failed, payment_intent.canceled
  • charge.refunded, refund.updated

The integrations page lists these events and the webhook URL to register.

Set up

Run onboarding

It creates the manual provider (installed, default) and a Stripe record.

Set environment variables

Set STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET. On /dashboard/platform/integrations, press Set up Stripe. It switches the Stripe provider on (isInstalled), creating the pp_stripe row if onboarding never ran. The page shows which variables are set, never their values. The webhook route only accepts an installed Stripe provider.

Register the webhook

Use the URL above and the signing secret as STRIPE_WEBHOOK_SECRET.

Integrations page

/dashboard/platform/integrations needs canManageIntegrations. It shows payment providers and whether each is installed, the Stripe setup guide, and recent webhook events.

Email

Booking confirmations, gift-card emails, and password resets send through SMTP when SMTP_HOST and SMTP_FROM are set.

On this page