v21

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-011060456.0 KB
Payments

Create Purchase Session

Creates a purchase session for completing a purchase.

post/payments/purchases/purchase-session

Request body

full_codestring required

The verification code, given as a query parameter in the purchase URL

price_idstring required

The Hexclave price ID to purchase

quantityinteger

The quantity to purchase

Example request

{
  "full_code": "proj_abc123_def456ghi789",
  "price_id": "price_1234567890abcdef",
  "quantity": 1
}

Response

Successful response

client_secretstring

Stripe client secret used by the browser to confirm payment via Stripe Elements. Omitted when no payment step is required from the customer; in that case the purchase is being settled without a confirmation step and the caller should skip mounting Stripe Elements.

Example response

{
  "client_secret": "1234567890abcdef_secret_xyz123"
}