Implementation Details
Payment Creation
Payments are created inside components/pages/add-reservation/BillingTab/PaymentSection/index.js. When the user has Stripe integration enabled, the component renders a StripePaymentModal:
{hasStripeIntegration && ( <Grid item sm={4} xs={12}> <Suspense fallback={null}> <StripePaymentModal order={order} /> </Suspense> </Grid>)}The modal lets the user create either a direct payment or a payment link. The form values are sent through GraphQL mutations:
createPaymentIntent– creates a Payment Intent on Stripe for direct card charges.createPaymentLink– generates a shareable link that opens a Stripe Checkout session.
Both resolvers live in server/graphql/resolvers/mutation/stripe/ and use the PlatformStripe helper to call the Stripe API. Each resolver also saves a payment session in the database and updates the associated order.
Webhook Handling
Stripe webhooks are posted to pages/api/stripe-connect/webhook/[location].js. The handler validates the signature and forwards the event to lib/webhooks/stripe-connect.js. The switch statement there dispatches to event-specific handlers such as handleChargeSucceeded, handlePaymentIntentSucceeded and others.
These handlers update payment records, confirm orders and send notifications. For example, handleChargeSucceeded fetches the related session and order, updates the payment status and enqueues an email notification.