Prompt

How do I integrate appointment scheduling with Stripe?

Technology / Scheduling & Booking Software1 observationLast seen Oct 16, 2026

Latest observation

Oct 16, 2026OpenAI APIWeb search: off

To integrate appointment scheduling with Stripe, you usually combine:

  1. A booking system to choose a time slot
  2. Stripe Checkout / Payment Intents to collect payment
  3. A webhook flow to confirm the booking only after payment succeeds

Here’s a practical approach.


1) Decide your booking flow

Common patterns:

A. Pay first, then confirm booking

  • User selects an appointment time
  • You create a Stripe payment session
  • After payment succeeds, you finalize the booking

Best when you want to avoid unpaid reservations.

B. Reserve first, then pay

  • User selects a time
  • You temporarily hold the slot
  • They pay within a short window
  • If payment fails or expires, release the slot

Best when you want to reduce double-booking, but it adds complexity.


2) Use Stripe Checkout for simplest payment handling

Stripe Checkout is the easiest way to accept payments.

Basic flow

  1. User picks a date/time
  2. Your backend creates a booking draft
  3. Backend creates a Stripe Checkout Session with:
    • amount
    • currency
    • metadata for appointment details
    • success/cancel URLs
  4. User pays on Stripe-hosted page
  5. Stripe sends a webhook like checkout.session.completed
  6. Your backend marks the appointment as confirmed

3) Store appointment data in your database

Create a table like:

  • appointments
    • id
    • customer_name
    • customer_email
    • start_time
    • end_time
    • status (pending, confirmed, cancelled)
    • stripe_checkout_session_id
    • stripe_payment_intent_id
    • created_at

You should also store availability/slot data to prevent double booking.


4) Example backend flow

Step 1: Create a booking draft

When the user picks a slot:

  • verify the slot is available
  • create an appointment record with status pending

Step 2: Create Stripe Checkout Session

Include appointment details in metadata so you can reconcile later.

Example (Node.js):

const session = await stripe.checkout.sessions.create({
  mode: 'payment',
  payment_method_types: ['card'],
  line_items: [
    {
      price_data: {
        currency: 'usd',
        product_data: {
          name: 'Appointment Booking',
        },
        unit_amount: 5000, // $50.00
      },
      quantity: 1,
    },
  ],
  success_url: `${YOUR_DOMAIN}/success?session_id={CHECKOUT_SESSION_ID}`,
  cancel_url: `${YOUR_DOMAIN}/cancel`,
  metadata: {
    appointmentId: appointment.id,
    customerEmail: appointment.customer_email,
    startTime: appointment.start_time,
  },
});

5) Confirm payment with a webhook

Do not rely only on the success page. Always use Stripe webhooks.

Listen for:

  • checkout.session.completed
  • optionally payment_intent.succeeded

Example logic:

  • verify webhook signature
  • get appointmentId from metadata
  • confirm the appointment in your DB
  • mark slot as occupied

Pseudo-flow:

if (event.type === 'checkout.session.completed') {
  const session = event.data.object;
  const appointmentId = session.metadata.appointmentId;

  // update appointment to confirmed
  await db.appointments.update(appointmentId, {
    status: 'confirmed',
    stripe_checkout_session_id: session.id,
    stripe_payment_intent_id: session.payment_intent,
  });
}

6) Handle cancellations, expirations, and refunds

You should plan for edge cases:

If payment fails or user abandons checkout

  • keep appointment as pending
  • automatically expire or release after a timeout

If user cancels

  • mark appointment as cancelled
  • free the slot

If you need to refund

  • use Stripe Refunds API
  • update booking status accordingly

7) Prevent double bookings

This is critical.

Use one or more of:

  • database transactions
  • unique constraint on (start_time, provider_id) or (slot_id)
  • “lock” the slot when creating the pending appointment
  • short expiration window for pending reservations

A common strategy:

  • mark slot reserved
  • create Checkout Session
  • if payment succeeds, mark it confirmed
  • if not paid within 15 minutes, release it

8) If you need recurring or advanced scheduling

If your business has more complex needs, consider:

  • integrating a scheduler like Cal.com, Acuity, or Calendly
  • or building your own calendar availability engine
  • then connect payment with Stripe on booking confirmation

9) Recommended architecture

A clean setup is:

Frontend

  • calendar UI
  • time slot selection
  • checkout redirect

Backend

  • availability checks
  • appointment creation
  • Stripe session creation
  • webhook handling

Database

  • users/customers
  • appointments
  • provider availability
  • payment status

10) Security best practices

  • Never trust the client to determine price
  • Create prices on the server
  • Verify Stripe webhook signatures
  • Use idempotency keys when creating sessions or bookings
  • Don’t confirm bookings from the success page alone

Simple end-to-end flow

  1. User selects a time slot
  2. Backend validates availability
  3. Backend creates pending appointment
  4. Backend creates Stripe Checkout Session
  5. User pays
  6. Stripe webhook confirms payment
  7. Backend marks appointment as confirmed
  8. Send confirmation email / calendar invite

If you want, I can also give you:

  • a Node.js/Express example
  • a Next.js example
  • a Python/Django example
  • or a database schema + webhook implementation

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.