---
title: "Create Purchase Session"
method: POST
path: "/payments/purchases/purchase-session"
tags: ["Payments"]
---

# Create Purchase Session

`POST /payments/purchases/purchase-session`

Creates a purchase session for completing a purchase.

## Request body

- object
  - `full_code` string, required — The verification code, given as a query parameter in the purchase URL
  - `price_id` string, required — The Hexclave price ID to purchase
  - `quantity` integer — The quantity to purchase

## Response `200`

Successful response

- object
  - `client_secret` string — Stripe client secret used by the browser to confirm payment or setup via Stripe Elements. Omitted when no confirmation step is required from the customer.
  - `stripe_intent_type` 'payment' | 'setup' — Whether client_secret is a PaymentIntent (immediate charge) or SetupIntent (e.g. free trial card collection). Omitted when client_secret is omitted.

## Changes

- **2026-08-03** `f1fc76343c9e` — 1 info
  - added the optional property `stripe_intent_type` to the response with the `200` status
- **2026-05-21** `d3b4be3fad24` — 1 breaking
  - the response property `client_secret` became optional for the status `200`
- **2026-05-15** `180fda38d099` — 1 breaking
  - the `quantity` request property type/format changed from `number`/`` to `integer`/``

[Change history](https://skmtc.dev/hexclave/apis/hexclave-rest-api-2/changes/payments/purchases/purchase-session/post.md)

---

[API](https://skmtc.dev/hexclave/apis/hexclave-rest-api-2.md) · [All operations](https://skmtc.dev/hexclave/apis/hexclave-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hexclave/hexclave-rest-api-2/revisions/897c83038ab2/schema)
