Skip to main content
POST
/
payments
/
purchases
/
purchase-session
Create Purchase Session
curl --request POST \
  --url https://api.stack-auth.com/api/v1/payments/purchases/purchase-session \
  --header 'Content-Type: application/json' \
  --data '
{
  "full_code": "proj_abc123_def456ghi789",
  "price_id": "price_1234567890abcdef",
  "quantity": 1
}
'
{
  "client_secret": "1234567890abcdef_secret_xyz123"
}

Documentation Index

Fetch the complete documentation index at: https://stackauth-e0affa27-chore-move-mcp-to-a-sep-app.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
full_code
string
required

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

Example:

"proj_abc123_def456ghi789"

price_id
string
required

The Stack auth price ID to purchase

Example:

"price_1234567890abcdef"

quantity
number
default:1

The quantity to purchase

Example:

1

Response

200 - application/json

Successful response

client_secret
string
required

The Stripe client secret for completing the payment

Example:

"1234567890abcdef_secret_xyz123"