Subscription Status
Learn how to get subscription status changes to your server via webhooks
This webhook service keeps you informed about any changes related to subscriptions, such as new subscriptions, renewals, updates in grace status, or subscription cancellations.
Setup the Endpoint URL
Webhook events are sent to your server via HTTP POST
. You configure the endpoint URL through Developer Tools / Webhooks menu under your project.
Events Format
Webhook events are serialized in JSON. The body of a POST
request to your server will contain the serialized event.
Fields
queue | It contains information on the webhook type and history. |
parameters | Contains the details on Webhook info. |
package | Includes information on the subscriber's active or most recently used package. |
newPackage | This field contains the package information to be sent if the subscriber has downgraded their package. It is returned as null if there is no package change. |
customer | This is the parameter through which the subscriber's Zotlo information is sent. |
card | It's the service that sends registered credit card information. |
profile | This is the service that sends the subscriber's subscription status, such as the expiration date. The subscriber's status can be determined by looking at the status value. |
profile.customParameters | This parameter is used to send relevant records to the subscriber if specific parameters are supplied to the subscriber during the subscription. Null is the default value |
profile.quantity | The number of people who have access to a subscription is returned here if it has been opened to more than one user. The default values is 1. |
profile.cancellation | If the subscription is canceled, this parameter contains the reason for the cancellation as well as the cancellation date. The subscription is sent as null if it is not canceled. This parameter should be used to check the subscriber's cancellation status |
profile.originalTransactionId | This is the transactionId value of the subscriber's first purchase. |
profile.subscriptionType | It can take paid or trial values. If it's a trial, the subscriber is still in the trial period, and if it's a paid subscription, at least one payment has been received |
profile.subscriberId | This is the subscriber's unique ID value sent by the client at the start of the subscription. This subscriberId is used to make all system queries. |
profile.expireDate | The subscription's expiration date. |
profile.package | This is the subscriber's current active package ID. |
profile.status | The subscriber's current status. It can be set to active, passive, or grace parameters. The subscription will continue if it is active. The subscription is terminated if it is passive. If the subscription parameter is grace, it means that the subscription could not be renewed because it could not be charged. The status value for users who cancel their subscription appears as active until the expireDate arrives |
profile.realStatus | The subscriber's actual status. Unlike the active parameter, it returns the subscriber's current status. Even if the subscription does not expire, users who cancel it are treated as passive in this parameter. |
profile.country | The subscriber's country code. |
profile.phoneNumber | This is the phone number of the subscriber that is on file in the system. |
package_update | The value 1 is used if the notification is sent after the package change. In all other cases, the value 0 is sent. |
Last updated