---
title: "Validate Purchase Code"
method: POST
path: "/payments/purchases/validate-code"
tags: ["Payments"]
---

# Validate Purchase Code

`POST /payments/purchases/validate-code`

Validates a purchase verification code and returns purchase details including available prices.

## Request body

- object
  - `full_code` string, required — The verification code, given as a query parameter in the purchase URL
  - `return_url` string — URL to redirect to after purchase completion

## Response `200`

Successful response

- object
  - `product` object
    - `display_name` string, required
    - `customer_type` 'user' | 'team' | 'custom', required
    - `free_trial` integer[]
    - `server_only` boolean
    - `stackable` boolean
    - `prices` object
    - `included_items` object
    - `client_metadata` object, nullable — Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client.
    - `client_read_only_metadata` object, nullable — Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status.
    - `server_metadata` object, nullable — Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the product here.
  - `stripe_account_id` 'null', nullable
  - `project_id` string, required
  - `project_logo_url` 'null', nullable
  - `already_bought_non_stackable` boolean, required
  - `conflicting_products` object[], required
    - `product_id` string, required
    - `display_name` string, required
  - `replaces_stripe_subscription` boolean, required — Whether this purchase will replace an existing Stripe-backed subscription in-place (free trials are not re-applied on that path)
  - `test_mode` boolean, required
  - `charges_enabled` boolean, nullable

## Changes

> 24 revisions in range; 5 could not be searched.

- **2026-06-04** `6e758c13847f` — 2 breaking
  - the response property `charges_enabled` became optional for the status `200`
  - the response property `stripe_account_id` became optional for the status `200`
- **2026-05-15** `180fda38d099` — 3 warning
  - added the new `custom` enum value to the `product/customer_type` response property for the response status `200`
  - added the new `team` enum value to the `product/customer_type` response property for the response status `200`
  - added the new `user` enum value to the `product/customer_type` response property for the response status `200`

[Change history](https://skmtc.dev/hexclave/apis/hexclave-rest-api-2/changes/payments/purchases/validate-code/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)
