Skip to main content
To process purchases via Stripe, you need to create a Stripe Checkout Session on your server and send the purchase data to Qonversion after a successful payment.

1. Create a Checkout Session

Create a Stripe Checkout Session on your server using the Stripe API. Refer to the Stripe documentation for detailed instructions.

2. Send Purchase to Qonversion

After a successful payment, retrieve the Stripe Session data and send the purchase information to Qonversion using the API:
curl -X POST \
  https://api.qonversion.io/v3/users/{user_id}/purchases \
  -H "Authorization: Bearer {project_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "currency": "USD",
    "price": "9.99",
    "stripe_store_data": {
      "subscription_id": "{stripe_subscription_id}",
      "product_id": "{qonversion_product_id}"
    }
  }'
Replace {stripe_subscription_id} with the Stripe subscription ID from the Checkout Session and {qonversion_product_id} with the product ID configured in Qonversion.
FieldSource
currencystripe_session.currency
pricestripe_session.amount_total
stripe_store_data.subscription_idstripe_session.subscription.id
stripe_store_data.product_idYour Stripe Product ID

Getting the User ID

The {user_id} in the request URL is the Qonversion User ID. You can obtain it in two ways:
  • From the SDK — call the userInfo() method and use the qonversionId property from the result. See User Identifiers for details.
  • Via API — create a user by calling POST /v3/users/{id}. See the API reference for details.

Web SDK

If you are using Qonversion on the web, you can also use the Qonversion Web SDK to handle purchases. See the full Stripe Integration guide for details.