Webhooks

You can use Webhooks to notify your server anytime an event happens.

Qonversion Webhooks send real-time data to your HTTP endpoints. You can monitor user subscription events and react immediately. For example, you can monitor when your users cancel their subscription and offer them a discount using email.

Setting up webhook URL

To set up Webhooks, go to Integrations -> Webhooks.

Register your URL and Qonversion will send a request. If the endpoint server returns a 200 response code, the integration is activated.

Request Format

Qonversion sends POST request to webhook URL every time an event occurs. The request header contains Authorization-Token Value as Basic authorization field. Use that to protect your server from unwanted requests.

Request Header:

Authorization: Basic {Header Authorization-Token}
Accept: application/json

Request Body:

{
"event_name": "trial_converted",
"user_id": "3YjIDEUDaf_5g4IdWw6zcMlLgfg_YQp2",
"custom_user_id": "",
"advertiser_id": "9FD1767D-8B48-45BD-A2F4-1C08B08E56F2",
"time": 1560641088,
"product_id": "com.myapp.subs.9.99.trial",
"revenue": {
"value": 7.99,
"currency": "EUR",
"value_usd": 9.99
}
}

Column

Description

event_name

Event name provided in integration config.

More about tracked events read here

user_id

Qonversion unique user identifier

custom_user_id

Unique user identifier provided by SDK

advertiser_id

IDFA or EDFA

time

The time App Store or Google Play charged the user's account or Qonversion detected event, in the UNIX epoch time format, in seconds. Read more about event time here

product_id

App Store or Google Play product identifier

revenue

Dictionary with transaction revenue details