Webhooks連携でできること
ストアをまたいでひとつのWebhookハンドラーを使う
アプリストアとWebチェックアウトの購入、更新、返金を同じ形式で処理できます。
アプリのアクセスを同期する
access_level_updatedイベントを使って、バックエンドでプレミアムアクセスを付与、延長、取り消しできます。独自のワークフローを実行する
バックエンドで、購入後にアカウントへクレジットを付与したり、支払いに失敗したらサポートタスクを作成したり、イベントをCRMに転送したりできます。
すべてのストアのイベントをひとつのストリームに
アプリストアでもWebでも、購入、更新、返金を同じ形式で受け取れます。
バックエンドでアクセスを同期するには、access_level_updatedイベントひとつを処理するだけです。
このユーザーは12月11日までPremiumを利用できます。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"
}
}一部のフィールドを抜粋したペイロードの例です。
Webhooksに送信できるイベント
コードを書かずに、Adaptyのダッシュボードからイベントを転送できます。イベントを選ぶと、何がトリガーになるかを確認できます。



