Webhook - General 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 General Topics

transactionCreated

The event is triggered whenever a new transaction is made on the broadcaster’s content or subscriptions. The subscriptionPlanId field value is an ID of a subscription plan the transaction has been made for, or null if a transaction has been made on content purchase.

{
    "broadcasterId": 558186818,
    "topic": "transactionCreated",
    "data": {
        "offerId": "S123321123_BY",
        "transactionId": "T111333222",
        "customerId": 332442553,
        "paymentId": 1536331075,
        "offerPrice": 5.25,
        "offerCurrency": "USD",
        "discountRate": null,
        "subscriptionPlanId": 543221430,
        "externalData": 'data',
        "customerEmail": '[email protected]'
    }
}

customerRegistered

The event is triggered whenever a new customer is registered using broadcaster’s checkout or registerCustomer API, or an existing Cleeng customer purchases broadcaster’s content or subscription for the first time.

{
    "broadcasterId": 558186818,
    "topic": "customerRegistered",
    "data": {
        "customerId": 593300903,
        "customerEmail": '[email protected]'
    }
}

customerConsentUpdated

The event is triggered whenever a customer changes a consent settings.

{
    "broadcasterId": 558186818,
    "topic": "customerConsentUpdated",
    "data": {
        "customerId": 593300903,
        "customerEmail": '[email protected]',
        "consentName": "broadcaster_marketing",
        "consentState": "accepted",
        "consentChangeDate": "2019-05-16T09:45:13+02:00"
    }
}

paymentReadyForRefund

The event is triggered from the publisher dashboard 'Cancel this transaction' button

🚧

Available only for Bombora Payment Gateway

{
    "broadcasterId": 558186818,
    "topic": "paymentReadyForRefund",
    "data": {
        "paymentId": 123123123,
        "paymentGateway": 'bambora',
        "customerId": 123123123,
        "customerEmail": '[email protected]',
        "orderId": 123123123,
    }
}

paymentDetailsDeactivated

The event is triggered when payment details stop being used for recurring payments, for example when active payment details are deleted or new active payment details are created.

{
    "broadcasterId": 402171721,
    "topic": "paymentDetailsDeactivated",
    "data": {
        "paymentDetailsId": 811837427,
        "paymentMethodId": 611593213,
        "customerId": 965936709
    }
}

Did this page help you?