Send subscriptions events to a custom webhook channel.
Glassfy monitors the subscriptions and sends all the relevant events to the custom Webhook even if the user does not open the app.

  1. Open Webhooks connector setting in the Glassfy dashboard
  2. Set your webhook URL to the "Custom webhook URL" field
  3. (Optional) Set the autorisation-token to be sent with each webhook POST

Request format

Glassfy will send POST requests every time an event is generated with the following format:

Request body

{
    "id": "21e8fe4ea29e4d699a5be432cf79dd9a",
    "event_date": 1644933838,
    "source": "SDK",
    "type": 5008,
    "environment": "S",
    "store": "1",
    "vendorid": "8NOV6FQBHHRJ4F9N2HV0HUXOQ5LL0QA3",
    "appid": "SZ126UWWVGTH82UE9313EQQ5N1YM3QOA",
    "subscriberid": "dfd29763e530470688a5741f419e7c07",
    "productid": "ios_read_article_5",
    "date_ms": 1644933832000,
    "original_purchase_date_ms": 1644933832000,
    "expire_date_ms": 16449359832000,
    "duration": 7,
    "auto_renew_status": false,
    "original_transaction_id": "2000000033202384",
    "web_order_line_item_id": "54598498589489895",
    "price": 0.99,
    "price_usd": 1.3381319169279828,
    "currency_code": "GBP",
    "country_code": "GB",
    "sub_platform": "1",
    "system_version": "15.3.1",
    "device": "iPhone14,2",
    "sdk_version": "dev",
    "bundle_version": "1",
    "app_version": "1.0",
    "is_trial_period": false,
    "trial_status": 0,
    "customid": "custom user id"
}
idunique event identifier
event_dateevent dateEpoch time on when the event has been generated. It may differ for the purchase date. Use date_ms for purchase date
sourcesource that generates the eventSDK: event generated by the SDK
S2S: event generated by server to server or playstore
RTH: event generated internally by Glassfy
typeevent_typePlease see table below for possible values
environmentenvironmentCan be P (production) or S (sandbox)
storestore1: App Store
2: Play Store
3: Paddle
vendoridvendor identifierunique identifier of the company using Gassfy SDK
appidapplication identifierunique identifier of the application using Gassfy SDK
subscriberidsubscriber identifierunique identifier of the user purchasing the subscription or IAP
see here
productidproduct identifierApp Store, Play Store, Paddle product identifier
date_msevent date in millisecondsthis is the date of the purchase or event
original_purchase_date_msoriginal purchase date in milliseconds
expire_date_mssubscription expire date in ms
durationsubscription duration in days
auto_renew_statususer changes auto renew status:
if false the subscription will not autorenew at the expire date
only relevant for event
5005 SubscriptionDidChangeRenewalStatus
original_transaction_idOriginal transaction identifier
web_order_line_item_idoriginal web order
pricepriceprice in user currency
price_usdUSD priceprice in USD
currency_codecurrency codethree letters ISO currency code
country_codecountry_codethree letters ISO country code
system_versionoperating system version
devicedevice typeeg: iPhone14,2
sdk_versionsdk version
app_versionapplication version
is_trial_periodapp is in trialtrue or false
trial_statustrial conversion status0: N/A
1:trial converted to payed subscription
2:trial non converted to payed subscription
customidcustom identifiercustom identifier
Event Typeevent_typeDescription
SubscriptionInitialBuy5001User starts a subscription
SubscriptionRestarted5002A previously interrupted subscription restarted
SubscriptionRenewed5003Subscription automatically renewed
SubscriptionExpired5004Subscription expired
SubscriptionDidChangeRenewalStatus5005User changed the autorenew status
IsInBillingRetryPeriod5006User is in billing retry
SubscriptionProductChange5007User upgrades or downgrades the subscription
InAppPurchase5008In App Purchase
SubscriptionRefund5009Subscription Refund
SubscriptionPaused5010Subscription Paused
SubscriptionResumed5011Subscription Resumed

Request header

Authorization: Bearer authorisation-token
Accept: application/json

Retries

Glassfy will send POST requests to your server with the authentication header and a json with the details of the event. Your server must return a 200 status code. If the status code is not 200 Glassfy will retry 5 times (after 5, 15, 30 and 60 minutes). After all the retries we will stop send the event.