---
title: "Validate Paddle purchase"
method: POST
path: "/api/v2/server-side-api/purchase/paddle/token/validate/"
tags: ["Paddle"]
---

# Validate Paddle purchase

`POST /api/v2/server-side-api/purchase/paddle/token/validate/`

Validates a purchase using the provided Paddle token using the credentials of Paddle in your App Settings inside Adapty Dashboard. 
If the purchase is valid, the transaction history is imported from Paddle to the profile in Adapty with the specified customer_user_id. 
If there was no profile with this customer_user_id before — it will be created.

## Request body

- PaddleValidationRequest
  - `customer_user_id` string, required — The ID of your user in your system
  - `paddle_token` string, required — Token of a Paddle object that represents a unique purchase. Could be either a transaction id (txn_...) or a subscription id (sub_...)

## Response `200`

Purchase validated successfully

- ProfileResponse
  - `data` Profile, required
    - `app_id` string, uuid, required — The internal ID of your app
    - `profile_id` string, uuid, required — Adapty profile ID
    - `customer_user_id` string, nullable, required — The ID of your user in your system
    - `total_revenue_usd` number, float, required — A float value representing the total revenue in USD earned in the profile
    - `segment_hash` string, required — Internal parameter
    - `timestamp` integer, required — Response time in milliseconds, needs for resolve a race condition
    - `custom_attributes` CustomAttribute[], required — A maximum of 30 custom attributes to the profile are allowed to be set
      - `key` string, required — The key must be a string with no more than 30 characters. Only letters, numbers, dashes, points, and underscores allowed
      - `value` union, required — The attribute value must be no more than 50 characters. Only strings and floats are allowed as values
        - string
        - number
    - `access_levels` AccessLevel[], required — Array of Access level objects. Empty array if the customer has no access levels
      - `access_level_id` string — Access level identifier
      - `store` string — Store where the access level was purchased
      - `store_product_id` string — Product ID in the store
      - `store_base_plan_id` string, nullable — Base plan ID in the store
      - `store_transaction_id` string — Transaction ID in the store
      - `store_original_transaction_id` string — Original transaction ID in the store
      - `offer` OfferDTO
        - `category` 'introductory' | 'promotional' | 'offer_code' | 'win_back', required — Offer category
        - `type` 'free_trial' | 'pay_as_you_go' | 'pay_up_front', required — Offer type
        - `id` string, nullable — Offer ID
      - `starts_at` string, date-time, nullable — When the access level starts
      - `purchased_at` string, date-time — When the access level was purchased
      - `originally_purchased_at` string, date-time — When the access level was originally purchased
      - `expires_at` string, date-time, nullable — When the access level expires
      - `renewal_cancelled_at` string, date-time, nullable — When renewal was cancelled
      - `billing_issue_detected_at` string, date-time, nullable — When billing issue was detected
      - `is_in_grace_period` boolean — Whether the access level is in grace period
      - `cancellation_reason` string, nullable — Reason for cancellation
    - `subscriptions` Subscription[], required — Array of Subscription objects. Empty array if the customer has no subscriptions
      - `store` string — Store where the subscription was purchased
      - `store_product_id` string — Product ID in the store
      - `store_base_plan_id` string, nullable — Base plan ID in the store
      - `store_transaction_id` string — Transaction ID in the store
      - `store_original_transaction_id` string — Original transaction ID in the store
      - `offer` OfferDTO
        - `category` 'introductory' | 'promotional' | 'offer_code' | 'win_back', required — Offer category
        - `type` 'free_trial' | 'pay_as_you_go' | 'pay_up_front', required — Offer type
        - `id` string, nullable — Offer ID
      - `environment` string — Environment (Sandbox, Production)
      - `purchased_at` string, date-time — When the subscription was purchased
      - `originally_purchased_at` string, date-time — When the subscription was originally purchased
      - `expires_at` string, date-time, nullable — When the subscription expires
      - `renewal_cancelled_at` string, date-time, nullable — When renewal was cancelled
      - `billing_issue_detected_at` string, date-time, nullable — When billing issue was detected
      - `is_in_grace_period` boolean — Whether the subscription is in grace period
      - `cancellation_reason` string, nullable — Reason for cancellation
    - `non_subscriptions` NonSubscription[], required — Array of Non-Subscription objects. Empty array if the customer has no purchases
      - `purchase_id` string, uuid — Unique purchase identifier
      - `store` string — Store where the purchase was made
      - `store_product_id` string — Product ID in the store
      - `store_base_plan_id` string, nullable — Base plan ID in the store
      - `store_transaction_id` string — Transaction ID in the store
      - `store_original_transaction_id` string — Original transaction ID in the store
      - `purchased_at` string, date-time — When the purchase was made
      - `environment` string — Environment (Sandbox, Production)
      - `is_refund` boolean — Whether this is a refund
      - `is_consumable` boolean — Whether this is a consumable purchase

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `500` — Internal server error

---

[API](https://skmtc.dev/adapty/apis/adapty-server-side-api.md) · [All operations](https://skmtc.dev/adapty/apis/adapty-server-side-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adapty/adapty-server-side-api/revisions/abdc1c773a17/schema)
