Prompt

appointment booking api with payments

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

Latest observation

Oct 15, 2026OpenAI APIWeb search: off

Here’s a solid blueprint for an appointment booking API with payments.

Core features

  • User registration/login
  • Service provider management
  • Service catalog
  • Availability scheduling
  • Appointment booking/rescheduling/canceling
  • Payment processing
  • Refunds/cancellations
  • Notifications (email/SMS)
  • Admin dashboard endpoints

Suggested stack

  • Backend: Node.js + Express / NestJS, or Django / FastAPI
  • Database: PostgreSQL
  • Cache/queue: Redis
  • Payments: Stripe / Razorpay / PayPal
  • Auth: JWT + refresh tokens
  • Notifications: SendGrid, Twilio, Firebase

Main entities

  • User: customer or provider
  • Provider: business/person offering services
  • Service: haircut, consult, massage, etc.
  • Availability: slots by provider
  • Appointment: booking record
  • Payment: transaction record
  • Refund: if canceled or failed

API endpoints

Auth

  • POST /auth/register
  • POST /auth/login
  • POST /auth/refresh

Providers & services

  • GET /providers
  • GET /providers/:id
  • POST /providers
  • GET /services
  • POST /services

Availability

  • GET /providers/:id/availability
  • POST /providers/:id/availability
  • GET /slots?provider_id=1&date=2026-10-15

Appointments

  • POST /appointments
  • GET /appointments/:id
  • GET /users/:id/appointments
  • PATCH /appointments/:id/reschedule
  • PATCH /appointments/:id/cancel

Payments

  • POST /payments/intent
  • POST /payments/webhook
  • GET /payments/:id
  • POST /payments/:id/refund

Booking flow

  1. Customer selects provider, service, date, and slot.
  2. API checks slot availability.
  3. Create appointment with status pending_payment.
  4. Create payment intent with payment provider.
  5. On successful payment webhook:
    • mark payment paid
    • confirm appointment confirmed
  6. If payment fails or times out:
    • release slot
    • mark appointment cancelled or payment_failed

Important status values

Appointment

  • pending_payment
  • confirmed
  • cancelled
  • completed
  • no_show
  • rescheduled

Payment

  • requires_payment
  • processing
  • paid
  • failed
  • refunded
  • partially_refunded

Key implementation points

  • Use transaction locking to avoid double booking.
  • Store payment provider transaction IDs.
  • Make payment webhooks idempotent.
  • Define cancellation policy and refund rules.
  • Prevent booking overlapping slots.
  • Timezone handling is critical.

Example POST /appointments

{
  "user_id": 12,
  "provider_id": 3,
  "service_id": 7,
  "start_time": "2026-10-20T10:00:00Z",
  "end_time": "2026-10-20T10:30:00Z",
  "payment_method": "card"
}

Example response

{
  "appointment_id": 101,
  "status": "pending_payment",
  "payment_intent_id": "pi_12345",
  "amount": 5000,
  "currency": "USD"
}

Example database tables

appointments

  • id
  • user_id
  • provider_id
  • service_id
  • start_time
  • end_time
  • status
  • created_at
  • updated_at

payments

  • id
  • appointment_id
  • user_id
  • amount
  • currency
  • provider_payment_id
  • status
  • created_at
  • updated_at

availability_slots

  • id
  • provider_id
  • start_time
  • end_time
  • is_booked

If you want, I can also provide:

  1. a complete REST API spec
  2. a PostgreSQL schema
  3. a Node.js/Express implementation
  4. a Stripe payment flow example

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.