Payment providers
Pay-in-person and Stripe Checkout for deposits, gift cards, and retail orders at /dashboard/platform/payments.
Two adapters live in features/integrations/payment:
| Code | Adapter | Use |
|---|---|---|
pp_manual | manual | Pay in person. Default provider |
| Stripe | stripe | Checkout for booking deposits, online gift cards, and online retail orders |
Set up
Manual provider
On /dashboard/platform/payments, set up the manual provider (ensureDefaultPaymentProvider). Onboarding does this for you.
Stripe
Set STRIPE_SECRET_KEY in the environment, then choose Set up Stripe on the page. The storefront then accepts deposits, gift cards, and retail orders.
Without it, services that need a deposit cannot be booked online: "Online deposits are not available. Pay the deposit in the shop."
Payment sessions
A deposit creates a PaymentSession tied to an appointment.
| Command | Purpose |
|---|---|
startDepositCheckout | Customer starts Stripe Checkout |
confirmDepositCheckout | On return to /appointment, reads the session back from Stripe |
initiateAppointmentPaymentSession | Staff open a session; amount up to the appointment price |
captureAppointmentPaymentSession | Capture |
refundAppointmentPaymentSession | Refund |
cancelAppointmentPaymentSession | Cancel |
reconcilePaymentSession | Processor check; compares amount and currency |
Pay-in-person sessions have no processor to capture, refund, or reconcile. Record the payment at checkout, and refund cash from the receipt.
Gift cards
An online gift card stays pending until Stripe confirms payment, then becomes active with a one-year expiry. Staff redeem it at checkout on /dashboard/platform/pos with Gift card and its code (lookupGiftCard). A gift card checkout can be returned to the card (returnGiftCardCheckout). The Gift cards section on the payments page lists cards sold, and Refund returns an unused card's payment.
Open card payments past their lifetime are checked with Stripe each time the payments page loads, and with Check all with Stripe (expireStalePaymentSessions), which also settles open gift card and retail orders.
The page also shows takings by tender over 30 days, recent receipts, open card payments, and processor checks. POST /api/payment-webhooks/[providerCode] serves providers with a registered webhook handler and answers "Payment webhook signature is invalid." for bad signatures.