---
title: "Verify Google Play purchase"
method: POST
path: "/api/v1/subscription/verify"
tags: ["subscription", "android_app", "web_app", "NOT_USED"]
---

# Verify Google Play purchase

`POST /api/v1/subscription/verify`

Used by app to prove user has purchased a subscription

## Request body

- PurchaseVerificationRequest — 购买验证请求
  - `product_id` string, required — 产品ID
  - `purchase_token` string, required — 购买令牌
  - `order_id` string, nullable — 订单ID
  - `request_id` string, nullable

## Response `200`

Successful Response

- APIResponsePurchaseVerificationResponse
  - `code` integer
  - `message` string
  - `data` PurchaseVerificationResponse — 购买验证响应
    - `is_verified` boolean, required — 是否有效
    - `subscription` UserSubscription — 用户订阅响应模型
      - `plan_id` string, required — 订阅计划ID
      - `google_play_purchase_token` string, nullable — Google Play购买令牌
      - `google_play_order_id` string, nullable — Google Play订单ID
      - `google_play_subscription_id` string, nullable — Google Play订阅ID
      - `status` 'ACTIVE' | 'EXPIRED' | 'CANCELLED' | 'PENDING' | 'REFUNDED' | 'GRACE_PERIOD' | 'PAUSED' — 订阅状态
      - `start_date` string, date-time, nullable — 开始时间
      - `end_date` string, date-time, nullable — 结束时间
      - `trial_end_date` string, date-time, nullable — 试用结束时间
      - `auto_renew` boolean — 是否自动续费
      - `extra_data` object, nullable — 额外元数据
      - `id` string, required
      - `user_id` string, required
      - `plan` SubscriptionPlan — 订阅计划响应模型
        - `name` string, required — 计划名称
        - `description` string, nullable — 计划描述
        - `plan_type` 'MONTHLY' | 'QUARTERLY' | 'YEARLY', required — 订阅计划类型
        - `price` number, required — 价格
        - `currency` string — 货币
        - `google_play_product_id` string, required — Google Play产品ID
        - `discount_rate` number — 价格折扣率，范围0-1，1表示无折扣
        - `features` object, nullable — 功能权益配置
        - `chat_limit_per_day` integer — 每日聊天次数限制，-1为无限制
        - `agent_creation_limit` integer — Agent创建数量限制
        - `background_generation_limit_per_day` integer — 每日背景图生成次数限制，-1为无限制
        - `is_active` boolean — 是否激活
        - `sort_order` integer — 排序顺序
        - `id` string, required
        - `created_at` string, date-time, required
        - `updated_at` string, date-time, nullable
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, nullable
    - `message` string, required — 验证消息
    - `error_code` string, nullable — 错误代码

## Other responses

- `422` — Validation Error

## Changes

- **2025-11-30** `64a35ff6429d` — 1 info
  - api tag `NOT_USED` added
- **2025-11-25** `05cf5f034c74` — 2 info
  - api tag `android_app` added
  - api tag `web_app` added
- **2025-09-29** `bd9470194fe1` — 1 info
  - added the new optional request property `request_id`
- **2025-09-10** `56253b536c00` — 1 breaking
  - removed the required property `data/anyOf[subschema #1: PurchaseVerificationResponse]/is_valid` from the response with the `200` status

[Change history](https://skmtc.dev/nascentcore/apis/inty-backend/changes/api/v1/subscription/verify/post.md)

---

[API](https://skmtc.dev/nascentcore/apis/inty-backend.md) · [All operations](https://skmtc.dev/nascentcore/apis/inty-backend/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nascentcore/inty-backend/revisions/1e014c365df2/schema)
