Skip to main content
POST
/
users
/
{user_id}
/
purchases
Create a purchase
curl --request POST \
  --url https://api.qonversion.io/v3/users/{user_id}/purchases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "currency": "USD",
  "price": "12.99",
  "purchased": 1653458781,
  "stripe_store_data": {
    "subscription_id": "sub_123e4567",
    "product_id": "prod_123e4567"
  }
}
'
{
  "user_id": "QON_7791a27fc4e747412381842b36a",
  "currency": "USD",
  "price": "12.99",
  "purchased": 1653458781,
  "stripe_store_data": {
    "subscription_id": "sub_123e4567",
    "product_id": "prod_123e4567"
  }
}

Documentation Index

Fetch the complete documentation index at: https://documentation.qonversion.io/llms.txt

Use this file to discover all available pages before exploring further.

Stripe is the typical use case. app_store_data and play_store_data are accepted for completeness but App Store and Play Store purchases are normally handled automatically by the Qonversion SDK.

Authorizations

Authorization
string
header
required

Use your Project Key from the Qonversion dashboard (Project Settings -> Project Keys -> Project Key).

Production keys have no prefix; keys prefixed with test_ target the sandbox environment.

Example (sandbox): Bearer test_PV77YHL7qnGvsdmpTs7gimsxUvY-Znl2 Example (production): Bearer JFPATc4VaaWYsfurml3qZ4zsmNw0VfWH

Path Parameters

user_id
string
required

Qonversion User ID

Body

application/json
currency
string
required

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

price
string
required

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

purchased
integer<int64>
required

Unix epoch seconds of the transaction

stripe_store_data
object
app_store_data
object

App Store transaction data. Use only when posting App Store purchases manually instead of via the SDK.

play_store_data
object

Google Play transaction data. Use only when posting Play purchases manually instead of via the SDK.

Response

Purchase created

The response echoes whichever store-data variant was provided in the request: exactly one of stripe_store_data, app_store_data, or play_store_data will be present.

user_id
string
required

Qonversion User ID

Example:

"QON_7791a27fc4e747412381842b36a"

currency
string

Three-letter ISO 4217 currency code (uppercase)

Example:

"USD"

price
string

Monetary amount (decimal string)

Example:

"12.99"

purchased
integer<int64>

Unix epoch seconds of the transaction

Example:

1653458781

stripe_store_data
object
app_store_data
object

App Store transaction data. Echoed only when the purchase was created with app_store_data.

play_store_data
object

Google Play transaction data. Echoed only when the purchase was created with play_store_data.