Link Search Menu Expand Document

Webhooks

Send subscriptions events to a custom webhook channel. Glassfy monitor 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 and paste the “Incoming Webhook URL”
  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

{
    "type": "SubscriptionStarted",
    "store": "i",
    "vendorid": "8NOV6FQBHHRJ4F9N2HV0HUXOQ5LL0QA3",
    "appid": "SZ126UWWVGTH82UE9313EQQ5N1YM3QOA",
    "original_transaction_id": "R9YECBG3ZG9ACDMHZA4GWAIFB97BXZ0T",
    "subscriberid": "R9YECBG3ZG9ACDMHZA4GWAIFB97BXZ0T",
    "productid": "ios_premium_weekly_1_99",
    "purchase_date_ms": "1608726707766",
    "price": "1.99",
    "currency_code": "GBP",
    "quantity": "1",
    "event_date": "1608726707"
}

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.


Copyright © 2021 Glassfy.