API Docs
/
No Results Found
Events

Events

Events can be used to let you know when something happens in your organization. Every happening in your organization will be recorded as a new Event. For example, when a new payment is received, we will create a payment_thankyou event; when a subscription is created, we will create a subscription_created event.

You can retrieve these events individually or as a list using our API. If you want to update the data on your server when an event occurs, you can use webhooks to send these event objects directly to an endpoint on your application’s server. Learn more about webhooks.

End Points

Attribute

event_id
string
Unique ID generated for a particular event
event_type
string
The type of event.
event_time
string
The time at which the event is created.
payload
string
Holds information about the event that occurred.
webhooks
array
List of objects holds information about the webhooks. Each object contains webhook_id, url, status and last_updated_time.
Show Sub-Attributes arrow
webhook_id
string
The unique ID generated for a webhook by the server. This can be used as an identifier.
url
string
The URL for which the webhook is sent.
status
string
Status of the webhook. This can be success, scheduled or failure.
last_updated_time
string
The time at which the webhook was last sent.

Example

{ "event_id": "90300000005337", "event_type": "subscription_activation", "event_time": "2016-06-05T18:28:20-0700", "payload": "{...}", "webhooks": [ { "webhook_id": "9030000020202", "url": "http://gatehost/webhooks/newsubscription/add", "status": "success", "last_updated_time": "2016-07-01T20:28:20-0700" } ] }

Retrieve an event

Details of an existing event.
oauthscope : ZohoSubscriptions.webhooks.READ

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/events/{event_id} -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "event": { "event_id": "90300000005337", "event_type": "subscription_activation", "event_time": "2016-06-05T18:28:20-0700", "payload": "{...}", "webhooks": [ { "webhook_id": "9030000020202", "url": "http://gatehost/webhooks/newsubscription/add", "status": "success", "last_updated_time": "2016-07-01T20:28:20-0700" } ] } }

List of events

List of all events.
oauthscope : ZohoSubscriptions.webhooks.READ

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/events -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "events": [ { "event_id": "90300000005337", "event_type": "subscription_activation", "event_time": "2016-06-05T18:28:20-0700" }, {...}, {...} ] }

Event Types

The following are the list of events that Zoho Subscriptions currently supports.

Note: For backdated subscriptions, events will not be created for any actions that occur in a date previous than the current date.

Events

subscription_created
string
Triggered when a subscription is created
trial_expiring
string
Triggered 3 days before when a subscription trial is about to expire
subscription_activation
string
Triggered when a subscription gets to Live state
subscription_ahead
string
Triggered 3 days before a subscription is about to renew
subscription_renewed
string
Triggered when a subscription is renewed
billing_date_changed
string
Triggered when the billing date for a subscription is changed
subscription_upgraded
string
Triggered when a subscription plan is upgraded from a lower to a higher plan
subscription_downgraded
string
Triggered when a subscription plan is downgraded from a higher to a lower plan
subscription_unpaid
string
Triggered when a subscription is marked as unpaid.
subscription_cancelled
string
Triggers when a subscription is cancelled.
subscription_reactivated
string
Triggered when a subscription is reactivated from the cancelled state.
subscription_cancellation_scheduled
string
Triggers when a subscription is chose to cancel at the next renewal.
subscription_expiring
string
Triggered 3 days before a subscriptions is about expire
subscription_expired
string
Triggers when a subscription is expired
subscription_deleted
string
Triggers when a subscription is deleted
invoice_created
string
Triggers when an invoice is raised
creditnote_added
string
Triggers when a credit note is added
payment_thankyou
string
Triggers when a payment for an invoice is recieved
payment_refunded
string
Triggers when a payment is refunded
payment_declined
string
Triggers when a payment for an invoice fails
card_expired
string
Triggers when a customer card is expired
card_expiring
string
Triggered 15 days before a customer card expires
card_deleted
string
Triggered when a customer card is deleted