Hype offers webhooks to notify your application when an event happens in your Hype community account.
There are two main Event Types that can trigger a Hype Webhooks event.
Contact - These occur whenever a contact signs up on your community or updates their profile.
Payment - These occur for payment or membership events associated to a given contact, including payment renewal, new payment, payment failure, or plan cancellation.
Each of these two main events have a distinct payload, with a subtype value indicating creation, update, or deletion based on the following scenarios:
New Contact Created (contact.created) - A free user has signed up.
Contact Updated (contact.updated) - A user made a change to their account, including changing selections on items like newsletter preferences.
Payment Created (payment.created) - A user has made a purchase through Hype, which could be a subscription purchase, a donation, a gift, etc.
Payment Failed (payment.updated) - Hype attempted to charge the card on file for a contact but was unable to. This is most common for recurring subscriptions where a credit card may have expired. This also captures refunds initiated through the Hype Dashboard, where the total amount a contact has paid changes.
Payment Deleted (payment.deleted) - A user cancels a subscription. Note: This also fires when users switch plans, because they are cancelling one plan to join another. If a plan price is changed in the Hype Dashboard, the payment deleted webhook will fire, and a payment created will be triggered when the plan renews for the contact at the adjusted price.
Creating Webhooks in Your Hype Account
First, you'll want to navigate to the Apps page of your Hype Dashboard:
https://dashboard.hype.co/apps
From here, you'll want to select Webhooks and select "Install" this will then open a prompt for you to configure the webhook URLs that you'd like to use and which events to send to them.
Within the new menu, you'll want to set the URL that you would like the webhooks to go to and choose the webhook events to send to the endpoint URL you set. You can add additional webhook endpoints by selecting "Add endpoint"
Once a webhook has been created, you'll be able to simulate data being sent to that endpoint by selecting "Simulate" next to the event type:
Payment Payload Example
{
"id": "00001234-4444-4f1e-8c6c-4adb7652a75c",
"publisher_id": "000p1234-5555-422c-9d39-d1df0fa3c673",
"email": "support@trypico.com",
"name": "Support User",
"type": "payment.created",
"source": "dashboard",
"data": {
"discount_code": null,
"membership": "Individual Subscriber",
"whitelisted": false,
"tier": "Golden Supporter",
"billing_interval": "Annual",
"billing_end": 1596664831,
"recurring": 100,
"total": 100,
"first_payment": 1594850393,
"final_payment": 1594850393,
"trial_end": null,
"acquisition": {
"audience": "Default Global",
"region": "United States",
"source": "Other",
"device": "Desktop",
"adblock": true
}
},
"version": "1.1.0",
"timestamp": 1596224512
}
Contact Payload Example:
{
"id": "00001234-4444-4f1e-8c6c-4adb7652a75c",
"publisher_id": "000p1234-5555-422c-9d39-d1df0fa3c673",
"email": "support@trypico.com",
"name": "Support User",
"type": "payment.created",
"source": "dashboard",
"data": {
"discount_code": null,
"membership": "Individual Subscriber",
"whitelisted": false,
"tier": "Golden Supporter",
"billing_interval": "Annual",
"billing_end": 1596664831,
"recurring": 100,
"total": 100,
"first_payment": 1594850393,
"final_payment": 1594850393,
"trial_end": null,
"acquisition": {
"audience": "Default Global",
"region": "United States",
"source": "Other",
"device": "Desktop",
"adblock": true
}
},
"version": "1.1.0",
"timestamp": 1596224512
}
As a note, webhooks are sent asynchronously, so it's possible in some cases for events to be sent as webhooks in a different order than the generating events that occurred.
Webhooks Source
To identify the person generating the event that triggered the webhook, Hype indicates user, Dashboard, and System.
User actions are taken from individual contacts.
Dashboard indicates that a community administrator made a change in the Hype Dashboard, including granting free access or refunding a user.
System indicates an automatic event within Hype, including removing premium newsletters from a user contact if their billing fails.
Whenever a charge renews, Hype will automatically include a value of "user". In some cases, this could include migration of data from other membership platforms to Hype initiated by the Hype platform, but based on previous user status.
For subscription deleted events, which indicate that a subscription was stopped immediately, these will be labeled as Dashboard sourced events. Users do not have the ability to immediately end their subscription, and can only choose not to renew.