Skip to main content
POST
curl

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Optional key that makes a retry safe. Generate one value per logical operation (8 to 128 ASCII letters, digits, underscores or hyphens) and resend the same value on every retry. A repeat of a completed request returns its original status with Idempotent-Replayed: true and a short body of state, resource_ids and response_hash; read the resources to recover their content. Reusing a key with a different request returns 422 idempotency_key_reuse; a request still running returns 409 idempotency_in_progress. Keys are kept for 30 days. See https://docs.hi-doctor.ai/api-reference/idempotency.

Pattern: ^[A-Za-z0-9_-]{8,128}$

Body

application/json
items
object[]
required

Items for this cart create.

plan
enum<string>
default:one_off

Plan for this cart create.

Available options:
one_off,
subscription
language
string
default:EN

Language for this cart create.

return_path
string

Relative app path used after returning from the provider. Maximum 500 characters.

Maximum string length: 500
session_id
string | null

Identifier of the related session. May be null when unavailable. Maximum 64 characters.

Maximum string length: 64
meta_snapshot

Meta snapshot for this cart create. May be null when unavailable.

oai_snapshot

Oai snapshot for this cart create. May be null when unavailable.

Response

Hosted checkout created; payment has not been completed.

provider
enum<string>
required

Checkout provider.

Available options:
stripe
checkout_url
string<uri>
required

Confidential hosted checkout URL.

session_id
string
required

Provider checkout session identifier.

expires_at
integer | null
required

Checkout expiration as Unix seconds, or null.

plan
string

Checkout plan when supplied by the selected flow.