---
title: "Verify Purchase"
method: POST
path: "/api/payments/verify-purchase"
tags: ["payments"]
---

# Verify Purchase

`POST /api/payments/verify-purchase`

## Request

- Base URL: `https://api.stellara.natlex.it` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stellara.natlex.it/api/payments/verify-purchase`
- Auth: HTTP bearer

Verify a purchase and grant access/coins.

Routes to the platform-specific verifier:
  - ``platform="android"``: Google Play Developer API (legacy default).
  - ``platform="ios"``: App Store Server API + JWS verification.

Both branches share the same ``_upsert_subscription`` /
``_atomic_coin_grant`` helpers below — the only platform-specific
work is the verification call itself + which set of credentials we
use to talk to the store.

## Request body

- VerifyPurchaseRequest
  - `product_id` string, required
  - `purchase_token` string, required
  - `platform` string

## Response `200`

Successful Response

- VerifyPurchaseResponse
  - `status` string, required
  - `subscription` SubscriptionInfo
    - `tier` string, required
    - `product_id` string, nullable
    - `expires_at` string, nullable
    - `subscription_status` string, nullable
  - `coins_granted` integer, nullable
  - `coin_balance` integer, nullable

## Other responses

- `422`: Validation Error

---

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