Skip to content

Create a stripe setup intent

Request

Creates a Stripe SetupIntent for collecting a patient's card on file. Only required for bill-to-patient appointments. Returns a client secret and publishable key to initialize Stripe.js on the client side.

Security
BearerAuth
Bodyapplication/jsonrequired
patientIdintegerrequired
Example:1
curl -i -X POST \
  https://docs.speedysticks.com/_mock/openapi/api/booking/setup-intent \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "patientId": 1
  }'

Responses

Setup intent created successfully.

Bodyapplication/json
setupIntentSecretstring

The Stripe client secret used to initialize the payment element on the frontend.

Example:"seti_1Jv3iK_secret_abc123"
publishableKeystring

Your Stripe publishable key for initializing Stripe.js.

Example:"pk_live_abc123"
Response
{ "setupIntentSecret": "seti_1Jv3iK_secret_abc123", "publishableKey": "pk_live_abc123" }