Skip to main content
POST
/
payments
/
purchases
/
validate-code
Validate Purchase Code
curl --request POST \
  --url https://api.stack-auth.com/api/v1/payments/purchases/validate-code \
  --header 'Content-Type: application/json' \
  --data '
{
  "full_code": "proj_abc123_def456ghi789",
  "return_url": "https://myapp.com/purchase-success"
}
'
{
  "stripe_account_id": "<string>",
  "project_id": "<string>",
  "already_bought_non_stackable": true,
  "conflicting_products": [
    {
      "product_id": "<string>",
      "display_name": "<string>"
    }
  ],
  "test_mode": true,
  "charges_enabled": true,
  "product": {
    "display_name": "<string>",
    "customer_type": "<string>",
    "free_trial": [
      123
    ],
    "server_only": true,
    "stackable": false,
    "prices": {},
    "included_items": {},
    "client_metadata": {
      "featureFlag": true,
      "source": "marketing-campaign"
    },
    "client_read_only_metadata": {
      "featureFlag": true,
      "source": "marketing-campaign"
    },
    "server_metadata": {
      "featureFlag": true,
      "source": "marketing-campaign"
    }
  },
  "project_logo_url": "<string>"
}

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"

return_url
string

URL to redirect to after purchase completion

Example:

"https://myapp.com/purchase-success"

Response

200 - application/json

Successful response

stripe_account_id
string
required
project_id
string
required
already_bought_non_stackable
boolean
required
conflicting_products
object[]
required
test_mode
boolean
required
charges_enabled
boolean
required
product
object
project_logo_url
string