Webhook Message Schema (v2)
Subscribe Pro sends webhook notifications for each of the events documented below. The schema documented here below under each event specifies data contained in the 'data'
property of the webhook event request body.
The Webhook Event Request
Each webhook notification message arrives at your application (listening for HTTP messages) in the form of an HTTP web request as follows.
NOTE: The
webhook_event
property contains JSON encoded as string (JSON inside a JSON string).
An example webhook event request body (v2) looks like the following:
{
"webhook_event": "{\"id\":98989898, ... \"}",
"webhook_event_url": "//services/v2/webhook-events/98989898"
}
An example of the decoded webhook_event
property looks like the following:
{
"id": 98989898,
"type": "payment_profile.created",
"data": "{\"customer_id\":9898989,\"payment_profile_id\":989898,\"customer\":{\"id\":9898989, ... }}",
"destinations": [
{
"id": 9191919191,
"endpoint": {
"id": 91919191,
"channel": "url",
"status": "enabled",
"all_subscribed_event_types": false,
"subscribed_event_types": "{\"3\":\"payment_profile.created\",\"4\":\"payment_profile.updated\",\"5\":\"payment_profile.redacted\"}",
"created": "2020-06-04T12:24:44+0000",
"updated": "2020-06-04T12:24:49+0000"
},
"status": "delivered",
"last_attempt": "2020-07-19T15:29:23+0000"
}
],
"created": "2020-07-19T15:29:21+0000",
"updated": "2020-07-19T15:29:21+0000"
}
NOTE: The
data
property contains JSON encoded as string (JSON inside a JSON string). Yes, this is double encoded as JSON inside JSON string because thedata
property is inside thewebhook_event
property.
An example of the decoded data
property looks like the following:
{
"customer_id":9898989,
"payment_profile_id":989898,
"customer":{
"id":9898989,
...
"created":"2020-07-19T15:29:11+0000",
"updated":"2020-07-19T15:29:11+0000",
"subscription_count":0,
"active_subscription_count":0,
"trial_subscription_count":0,
"active_subscribed_qty":0
},
"payment_profile":{
"id":989898,
"customer_id":9898989,
...
"billing_address":{
...
"created":"2020-07-19T15:29:21+0000",
"updated":"2020-07-19T15:29:21+0000"
},
"created":"2020-07-19T15:29:21+0000",
"updated":"2020-07-19T15:29:21+0000"
}
}
All Webhook Event Types
Customer Event Types
Event | Type code |
---|---|
Customer Subscribed | customer.subscribed |
Customer Cancelled | customer.cancelled |
Payment Profile Event Types
Event | Type code |
---|---|
Payment Profile Created | payment_profile.created |
Payment Profile Updated | payment_profile.updated |
Payment Profile Redacted | payment_profile.redacted |
Subscription Event Types
Event | Type code |
---|---|
Subscription Created | subscription.created |
Subscription Updated | subscription.updated |
Subscription Cancelled | subscription.cancelled |
Subscription Status Changed | subscription.status_change |
Subscription Trial Converted | subscription.trial.converted |
Subscription Email Triggered | subscription.email |
Group Subscription Event Types
Event | Type code |
---|---|
Group Subscription Created | group_subscription.created |
Group Subscription Updated | group_subscription.updated |
Customer Events
Customer Subscribed Event
Event type: customer.subscribed
Notification is sent when a customer subscribes. This means the customer previously had 0 Active subscriptions and at least 1 Active subscription has just been added.
Schema for 'data'
property:
Property | Details |
---|---|
customer_id int | Subscribe Pro Customer ID of the customer record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
Customer Cancelled Event
Event type: customer.cancelled
A customer cancelled their last Active subscription leaving, 0 Active subscriptions.
Schema for 'data'
property:
Property | Details |
---|---|
customer_id int | Subscribe Pro Customer ID of the customer record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
Payment Profile Events
Payment Profile Created Event
Event type: payment_profile.created
A new payment profile was created for the given customer.
Schema for 'data'
property:
Property | Details |
---|---|
customer_id int | Subscribe Pro Customer ID of the customer record associated with this event. |
payment_profile_id int | Subscribe Pro Payment Profile ID of the payment profile record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
payment_profile PaymentProfile | Subscribe Pro Payment Profile record associated with this event. |
Payment Profile Updated Event
Event type: payment_profile.updated
A payment profile was updated for the given customer.
Schema for 'data'
property:
Property | Details |
---|---|
customer_id int | Subscribe Pro Customer ID of the customer record associated with this event. |
payment_profile_id int | Subscribe Pro Payment Profile ID of the payment profile record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
payment_profile PaymentProfile | Subscribe Pro Payment Profile record associated with this event. |
Payment Profile Redacted Event
Event type: payment_profile.redacted
A payment profile was redacted for the given customer.
Schema for 'data'
property:
Property | Details |
---|---|
customer_id int | Subscribe Pro Customer ID of the customer record associated with this event. |
payment_profile_id int | Subscribe Pro Payment Profile ID of the payment profile record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
payment_profile PaymentProfile | Subscribe Pro Payment Profile record associated with this event. |
Subscription Events
Subscription Created Event
Event type: subscription.created
A new subscription was created for the given customer.
Schema for 'data'
property:
Property | Details |
---|---|
subscription_id int | Subscribe Pro Subscription ID of the subscription record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
subscription Subscription | Subscribe Pro Subscription record associated with this event. |
Subscription Updated Event
Event type: subscription.updated
A subscription was updated for the given subscription.
Schema for 'data'
property:
Property | Details |
---|---|
subscription_id int | Subscribe Pro Subscription ID of the subscription record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
subscription Subscription | Subscribe Pro Subscription record associated with this event. |
Subscription Cancelled Event
Event type: subscription.cancelled
A subscription was cancelled for the given subscription.
Schema for 'data'
property:
Property | Details |
---|---|
subscription_id int | Subscribe Pro Subscription ID of the subscription record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
subscription Subscription | Subscribe Pro Subscription record associated with this event. |
Subscription Status Changed Event
Event type: subscription.status_change
The status changed for the given subscription.
Schema for 'data'
property:
Property | Details |
---|---|
subscription_id int | Subscribe Pro Subscription ID of the subscription record associated with this event. |
old_status string | Subscription status code from before the status change. For example: 'active' |
new_status string | Subscription status code from after the status change. For example: 'paused' |
customer Customer | Subscribe Pro Customer record associated with this event. |
subscription Subscription | Subscribe Pro Subscription record associated with this event. |
Subscription Trial Converted Event
Event type: subscription.trial.converted
The trial subscription converted to a full subscription.
Schema for 'data'
property:
Property | Details |
---|---|
subscription_id int | Subscribe Pro Subscription ID of the subscription record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
subscription Subscription | Subscribe Pro Subscription record associated with this event. |
Subscription Email Triggered Event
Event type: subscription.email
The subscription triggered an email of specified type. Events of this type are generated even if sending is disabled for the given email template type.
Schema for 'data'
property:
Property | Details |
---|---|
subscription_id int | Subscribe Pro Subscription ID of the subscription record associated with this event. |
email_template_type string | Email template type code for the type of email that was triggered. For detailed documentation of the email template type codes, see: Customer-Facing Transactional Email Templates |
customer Customer | Subscribe Pro Customer record associated with this event. |
subscription Subscription | Subscribe Pro Subscription record associated with this event. |
Payment Transaction Updated Event
Event type: payment_transaction.updated
The specified payment transaction has been updated. This currently happens as part of the 3DS2 authentication workflow.
Schema for 'data'
property:
Property | Details |
---|---|
transaction_id int | Subscribe Pro Transaction ID of the payment transaction record which was updated. |
customer_id int | Subscribe Pro Customer ID of the customer record associated with this event. |
payment_profile_id int | Subscribe Pro Payment Profile ID of the payment profile record associated with this event. |
transaction Transaction | Subscribe Pro Transaction record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
payment_profile PaymentProfile | Subscribe Pro Payment Profile record associated with this event. |
Group Subscription Events
Group Subscription Created Event
Event type: group_subscription.created
A new group subscription was created for the given customer.
Schema for 'data'
property:
Property | Details |
---|---|
group_subscription_id int | Subscribe Pro Group Subscription ID of the subscription record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
group_subscription Group Subscription | Subscribe Pro Subscription record associated with this event. |
Group Subscription Updated Event
Event type: group_subscription.updated
A group subscription was updated for the given group subscription.
Schema for 'data'
property:
Property | Details |
---|---|
group_subscription_id int | Subscribe Pro Group Subscription ID of the subscription record associated with this event. |
customer Customer | Subscribe Pro Customer record associated with this event. |
group_subscription Group Subscription | Subscribe Pro Subscription record associated with this event. |