Webhook
Learn how to set up webhook integration
Forward subscription events to your own web server.
When you activate a Webhook, Adapty sends a POST verification event in the following format:
{
adapty_check: {{check_string}}
}
Your server must respond with 200 or 201 code and return event containing:
{
adapty_check_response: {{check_string}}
}
with the same check_string
After that Adapty sends POST events about your users.
Event structure
Refer to the Events section to understand which events Adapty sends.
Each event is wrapped into the following structure
{
"profile_id": "772204ce-ebf6-4ed9-82b0-d8688ab62b01",
"customer_user_id": "123",
"idfv": "00000000-0000-0000-0000-000000000000",
"idfa": "00000000-0000-0000-0000-000000000000",
"advertising_id": "00000000-0000-0000-0000-000000000000",
"event_type": "non_subscription_purchase",
"event_datetime": "2020-02-18T18:40:22.000000+0000",
"event_properties": <event specific properties>,
"event_api_version": 1,
"attributions": {"attribution_source1": <attribution_data>, "attribution_source2": <attribution_data>, ...},
"user_attributes": {"attribute_name1": "attribute_value1", "attribute_name2": "attribute_value2", ...}
}
Where
Property | Type | Description |
---|---|---|
profile_id | str | Adapty user ID. |
customer_user_id | str | Developer user ID. For example, it can be your user UUID, email, or any other ID. Null if you didn't set it. |
idfv | str | IDFV value. |
idfa | str | IDFA value. |
adveristing_id | str | Advertising ID value. |
event_type | str | Lower cased event name. |
event_api_version | int | Current Adapty API version. The current value is 1. |
event_properties | json | JSON of event properties. |
attributions | json | JSON of attribution data. |
user_attributes | json | JSON of custom user attributes. |
Event names mapping
You can change the mapping from default Adapty event names to your own
name can be any string except a blank.
Updated 15 days ago