In-App Purchase Webhooks

RevenueCat can send you notifications any time an event happens in your app and monitor state changes for your subscribers.

With webhooks you can:

  • Improve conversions

    Determine which paywalls have high trial conversion rates

  • Maximize LTV

    Find which product & paywall combinations have the highest LTVs

  • Win back users

    Offer discounts to users who churn

Events

Using webhooks you can connect the following events:

  • TEST
  • INITIAL_PURCHASE
  • NON_RENEWING_PURCHASE
  • RENEWAL
  • PRODUCT_CHANGE
  • CANCELLATION
  • UNCANCELLATION
  • BILLING_ISSUE
  • SUBSCRIPTION_PAUSED
  • TRANSFER
  • EXPIRATION

Sample Event

Below is sample webhook for an Unsubscribe event:

JSON
1{
2  "event": {
3    "event_timestamp_ms": 1601337615995,
4    "product_id": "com.revenuecat.myapp.weekly",
5    "period_type": "NORMAL",
6    "purchased_at_ms": 1601417766000,
7    "expiration_at_ms": 1602022566000,
8    "environment": "PRODUCTION",
9    "entitlement_id": "pro",
10    "entitlement_ids": [
11      "pro"
12    ],
13    "presented_offering_id": "defaultoffering",
14    "transaction_id": "100000000000002",
15    "original_transaction_id": "100000000000000",
16    "app_user_id": "$RCAnonymousID:12345678-1234-1234-1234-123456789123",
17    "aliases": [
18      "$RCAnonymousID:12345678-1234-ABCD-1234-123456789123",
19      "user_1234"
20    ],
21    "offer_code": "free_month",
22    "original_app_user_id": "$RCAnonymousID:12345678-1234-ABCD-1234-123456789123",
23    "cancel_reason": "UNSUBSCRIBE",
24    "currency": "USD",
25    "price": 0.0,
26    "price_in_purchased_currency": 0.0,
27    "subscriber_attributes": {
28      "$idfa": {
29        "value": "12345678-1234-1234-1234-12345678912x",
30        "updated_at_ms": 1578018408238
31      },
32      "$appsflyerId": {
33        "value": "1234567891234-1234567",
34        "updated_at_ms": 1578018408238
35      },
36      "favorite_food": {
37        "value": "pizza",
38        "updated_at_ms": 1578018408238
39      }
40    },
41    "store": "APP_STORE",
42    "takehome_percentage": 0.7,
43    "type": "CANCELLATION",
44    "id": "12345678-ABCD-1234-ABCD-12345678912"
45  },
46  "api_version": "1.0"
47}

Ready to get started?

We saved 6,000+ engineering hours per year by switching to RevenueCat

Kemal Ugur, Pixery LabsKemal Ugur, Pixery Labs
Read case study