v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
Purchases

Create a purchase

Records a purchase for a user. Stripe and Paddle are the recommended paths when calling this API directly; App Store and Play Store purchases normally flow through the Qonversion SDK and rarely need to be POSTed manually.

Provide exactly one of stripe_store_data, paddle_store_data, app_store_data, or play_store_data.

post/users/{user_id}/purchases

Path parameters

user_idstring required

Qonversion User ID

Request body

currencystring required

Three-letter ISO 4217 currency code (case-insensitive; normalised to uppercase server-side)

pricestring required

Monetary amount (decimal string, e.g. "12.99")

purchasedinteger required

Unix epoch seconds of the transaction

Example request

{
  "stripe_store_data": {
    "subscription_id": "sub_123e4567",
    "product_id": "prod_123e4567"
  },
  "paddle_store_data": {
    "type": "subscription",
    "transaction_id": "txn_01hv4rrk",
    "subscription_id": "sub_01hv4rrk",
    "product_id": "pro_01hv4rrk"
  }
}

Response

Purchase created

user_idstring required

Qonversion User ID

currencystring

Three-letter ISO 4217 currency code (uppercase)

pricestring

Monetary amount (decimal string)

purchasedinteger

Unix epoch seconds of the transaction

Example response

{
  "user_id": "QON_7791a27fc4e747412381842b36a",
  "currency": "USD",
  "price": "12.99",
  "purchased": 1653458781,
  "stripe_store_data": {
    "subscription_id": "sub_123e4567",
    "product_id": "prod_123e4567"
  },
  "paddle_store_data": {
    "type": "subscription",
    "transaction_id": "txn_01hv4rrk",
    "subscription_id": "sub_01hv4rrk",
    "product_id": "pro_01hv4rrk"
  }
}