---
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

---

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