Webhook - Subscription Topics

Cleeng Webhooks

Webhooks are notifications that Cleeng sends out to subscribed broadcasters about certain events occurring in the platform. The events are sent in the form of a POST request made to specified endpoints with a JSON payload as its body.

The body of the request consists of three constant fields:

broadcasterId – the ID of the broadcaster that the webhooks is sent for,
topic – the name of the topic that the webhook is sent about,
data – topic-specific payload about the event.

Available Subscription Topics

subscriptionReadyForPaymentAuthorisation

The event is triggered whenever a payment authorization attempt should be made for a given subscription.

{
    "broadcasterId": 558186818,
    "topic": "subscriptionReadyForPaymentAuthorisation",
    "data": {
        "subscriptionId": "332332332",
        "offerId": "S123123123_US",
        "customerId": 123321123,
        "customerEmail": '[email protected]'
        "paymentDetailsId": 665665665,
        "active": true,
        "dunningAttemptDate": "2019-11-04T19:55:41Z",
        "dunningStatus": "authorize",
        "expirationDate": "2019-11-07T19:55:41Z",
        "currency": "USD",
        "paymentCountry": "BY",
        "paymentMethodId": 123123123,
        "token": "tok_en",
    }
}

subscriptionReadyForPaymentCapture

The event is triggered whenever a payment capture attempt should be made for a given subscription.

{
    "broadcasterId": 558186818,
    "topic": "subscriptionReadyForPaymentCapture",
    "data": {
        "subscriptionId": 121780131,
        "offerId": 'S729964196_CA',
        "customerId": 388082979,
        "customerEmail": '[email protected]',
        "paymentDetailsId": 255888155,
        "active": true,
        "dunningAttemptDate": '2019-03-03T09:43:20+01:00',
        "dunningStatus": 'capture',
        "expirationDate": '2019-03-06T09:43:20+01:00',
        "currency": 'USD',
        "token": 'tok_en',
        "paymentId": 123456789,
        "externalPaymentId": 'externalId',
        "orderId": 123123123
    }
}

subscriptionStopped

The event is triggered whenever a subscription is stopped.

{
    "broadcasterId": 123123123,
    "topic": "subscriptionStopped",
    "data": {
        "subscriptionId": 123123123,
        "subscriptionExternalId": "I-GHF2VR4V5U33"
        "customerId": 593300903,
        "customerEmail": '[email protected]'
    }
}

subscriptionRenewed

The event is triggered after recurring.

{
    "broadcasterId": 123123123,
    "topic": "subscriptionRenewed",
    "data": {
        "subscriptionId": 123123123,
        "offerId": "S123123123_PL",
        "customerId": 987654321,
        "customerEmail": '[email protected]',
        "active": true,
        "expirationDate": "2019-03-06T09:43:20+01:00"
    }
}

subscriptionReactivated

The event is triggered whenever a subscription is reactivated (change subscription status from canceled (stopped) into active)

{
    "broadcasterId": 123123123,
    "topic": "subscriptionReactivated",
    "data": {
        "subscriptionId": 123123123,
        "offerId": "S123123123_PL",
        "customerId": 987654321,
        "customerEmail": '[email protected]',
        "active": true,
        "expirationDate": "2019-03-06T09:43:20+01:00"
    }
}

subscriptionReadyForTermination

The event is triggered whenever a subscription should be terminated.

{
    "broadcasterId": 558186818,
    "topic": "subscriptionReadyForTermination",
    "data": {
        "offerType": "subscription",
        "subscriptionId": "332332332",
        "offerId": "S123123123_US",
        "customerId": 123321123,
        "customerEmail": '[email protected]',
        "paymentDetailsId": 665665665,
        "active": true,
        "dunningAttemptDate": "2019-11-04T19:55:41Z",
        "dunningStatus": "capture",
        "expirationDate": "2019-11-07T19:55:41Z",
        "subscriptionExternalId": "I-GHF2VR4V5U98",
        "token": "token_en"
    }
}

subscriptionCreated

The event is triggered whenever a subscription is created.

{
    "broadcasterId": 558186818,
    "topic": "subscriptionCreated",
    "data": {
        "offerType": "subscription",
        "subscriptionId": "332332332",
        "offerId": "S123123123_US",
        "customerId": 123321123,
        "customerEmail": '[email protected]',
        "active": true,
        "dunningAttemptDate": "2019-11-04T19:55:41Z",
        "dunningStatus": "capture",
        "expirationDate": "2019-11-07T19:55:41Z"
    }
}

subscriptionTerminated

The event is triggered whenever a subscription is terminated.

{
    "broadcasterId": 558186818,
    "topic": "subscriptionTerminated",
    "data": {
        "offerType": "subscription",
        "subscriptionId": "332332332",
        "offerId": "S123123123_US",
        "customerId": 123321123,
        "customerEmail": '[email protected]'
    }
}

Did this page help you?