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",
  "stripe_store_data": {
    "subscription_id": "sub_123e4567",
    "product_id": "prod_123e4567"
  }
}
'
{
  "currency": "USD",
  "price": "12.99",
  "purchased": 1653458781,
  "stripe_store_data": {
    "subscription_id": "sub_123e4567",
    "product_id": "prod_123e4567"
  }
}
This endpoint is for Stripe purchases only. App Store and Play Store purchases are handled automatically by the SDK.

Authorizations

Authorization
string
header
required

Use your Project Key from the Qonversion dashboard. Example: Bearer test_PV77YHL7qnGvsdmpTs7gimsxUvY-Znl2

Path Parameters

user_id
string
required

Qonversion User ID

Body

application/json
currency
string
required

Three-letter ISO 4217 currency code

price
string
required

Monetary amount

stripe_store_data
object
required

Response

Purchase created

user_id
string

Qonversion User ID

currency
string

Three-letter ISO 4217 currency code

Example:

"USD"

price
string

Monetary amount

Example:

"12.99"

purchased
integer

Unix epoch seconds of the transaction

Example:

1653458781

stripe_store_data
object