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:{stripe_subscription_id} with the Stripe subscription ID from the Checkout Session and {qonversion_product_id} with the product ID configured in Qonversion.
| Field | Source |
|---|---|
currency | stripe_session.currency |
price | stripe_session.amount_total |
stripe_store_data.subscription_id | stripe_session.subscription.id |
stripe_store_data.product_id | Your 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 theqonversionIdproperty 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.