Webhook 集成能帮你做什么
所有商店共用一个 Webhook 处理程序
以统一格式处理来自应用商店和网页结账的购买、续订和退款
保持应用访问权限同步
通过
access_level_updated事件,在你的后端授予、延长或撤销付费访问权限触发你自己的工作流
用你的后端在购买后为账户入账、在付款失败时创建支持工单,或将事件转发到你的 CRM
来自所有商店的统一事件流
以统一格式接收来自应用商店和网页端的购买、续订和退款事件。
要在后端保持访问权限同步,只需处理一个事件:access_level_updated。
该用户的 Premium 有效期至 12月11日。更新 expires_at,并在到期时据此终止访问权限。
{
"event_type": "access_level_updated",
"event_datetime": "2026-11-11T13:04:24.000000+0000",
"customer_user_id": "user_8f21c4",
"event_properties": {
"access_level_id": "premium",
"is_active": true,
"will_renew": true,
"is_in_grace_period": false,
"vendor_product_id": "premium_monthly",
"expires_at": "2026-12-11T13:04:24.000000+0000"
}
}查看是哪个付费墙和广告系列带来了这位订阅用户。price_usd 显示用户支付的金额,proceeds_usd 显示扣除商店佣金后的剩余金额。启用归因后,事件中会包含广告系列数据。
{
"event_type": "subscription_started",
"event_datetime": "2026-11-11T13:04:24.000000+0000",
"customer_user_id": "user_8f21c4",
"attributions": {
"appsflyer": {
"channel": "Facebook Ads",
"campaign": "strength_training_us"
}
},
"event_properties": {
"store": "app_store",
"vendor_product_id": "premium_monthly",
"paywall_name": "Onboarding paywall",
"price_usd": 9.99,
"proceeds_usd": 6.993,
"subscription_expires_at": "2026-12-11T13:04:24.000000+0000"
}
}可以看到这是该客户连续第 13 次付款,其累计收入已达到 $129.87。在本例中,此次续订适用较低的商店佣金。
{
"event_type": "subscription_renewed",
"event_datetime": "2026-11-11T21:04:23.000000+0000",
"customer_user_id": "user_2b7e90",
"event_properties": {
"store": "app_store",
"vendor_product_id": "premium_monthly",
"price_usd": 9.99,
"proceeds_usd": 8.4915,
"consecutive_payments": 13,
"rate_after_first_year": true,
"profile_total_revenue_usd": 129.87
}
}查看谁获得了退款以及退款时间。用退款金额核对你的收入。
{
"event_type": "subscription_refunded",
"event_datetime": "2026-11-10T09:12:05.000000+0000",
"customer_user_id": "user_5d3a17",
"event_properties": {
"store": "app_store",
"vendor_product_id": "premium_monthly",
"price_usd": -9.99,
"proceeds_usd": -6.993,
"cancellation_reason": "refund",
"subscription_expires_at": "2026-11-10T09:12:05.000000+0000"
}
}示例负载,仅展示部分字段。
可发送到 Webhook 的事件
无需编写代码,即可从 Adapty 仪表盘转发事件。选择一个事件,查看它的触发条件。



