v1
latestOpenAPI 3.0.32026-07-26120117318.1 KBPurchases
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
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
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"
}
}