---
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 Stack auth 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 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.

## Changes

- **2026-05-21** `95cc8acc3422` — 1 breaking
  - the response property `client_secret` became optional for the status `200`
- **2026-05-15** `f135fd8ca8b4` — 1 breaking
  - the `quantity` request property type changed from `number` to `integer`

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

---

[API](https://skmtc.dev/hexclave/apis/hexclave-rest-api.md) · [All operations](https://skmtc.dev/hexclave/apis/hexclave-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hexclave/apis/hexclave-rest-api/revisions/e134b68b3b7e?raw)
