GuideLab Docs

Create Payment Intent

Create a Stripe PaymentIntent for the authenticated clinic to pay invoices or an order basket. Clinic-only. Prices are resolved from the lab catalog.

POST
/checkout/create-payment-intent

Create a Stripe PaymentIntent for the authenticated clinic to pay invoices or an order basket. Clinic-only. Prices are resolved from the lab catalog.

Authorization

__Secure-guidelab-prod.session_token<token>

Production session cookie set for the guidelab.co domain by Better Auth

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/checkout/create-payment-intent" \  -H "Content-Type: application/json" \  -d '{    "labId": "string",    "idempotencyKey": "stringst"  }'
{  "providerStatus": "string",  "orderAutopayEnabled": true,  "clientSecret": "string",  "customerSessionClientSecret": "string",  "customerId": "string",  "paymentIntentId": "string",  "amount": 0,  "amountDisplay": "string",  "pricing": {    "subtotal": "string",    "discountPercent": "string",    "discountAmount": "string",    "taxMode": "none",    "taxAmount": "string",    "stampDutyAmount": "string",    "shippingAmount": "string",    "totalAmount": "string",    "payLaterTotal": "string"  },  "currency": "string",  "status": "string",  "convertedOrderId": "string",  "taxAmount": "string",  "taxMode": "none",  "taxIncludedInPrices": true}
{  "error": "string",  "code": "stripe_not_connected",  "details": {    "code": "payment_amount_exceeds_provider_limit",    "maxMinor": "99999999",    "currency": "string"  }}
{  "error": "string",  "code": "stripe_not_connected"}
{  "error": "string",  "code": "stripe_not_connected",  "details": {    "code": "PAYMENT_ATTEMPT_RETRY_REQUIRED"  }}
Empty