# Eventsub events for sub/resub

**URL:** <https://staging-discuss.dev.twitch.com/t/eventsub-events-for-sub-resub/42646>\
**Category:** API\
**Created:** [January 3, 2023, 1:37am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-events-for-sub-resub/42646 "2023-01-03T01:37:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raylanprime](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@raylanprime](https://staging-discuss.dev.twitch.com/u/raylanprime)\
**Post date:** [January 3, 2023, 1:37am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-events-for-sub-resub/42646/1 "2023-01-03T01:37:35Z")

</div>

Hi!

I have an application where I need to activate a stream overlay whenever a user subscribes. I chose to use EventSub in my serverless backend and consume the " channel.subscribe" event to get the first subscription of a user and the “channel.subscription.message” to get the renewals when the user shares the message (yes, in renewals I only want to get it if he shares the message).

The problem is that when a user renews his subscription I am receiving 2 events, one in “channel.subscription” (I believe it is at the time of payment) and another in “channel.subscription.message”, which is what I really need .

Is there any way to identify this first “channel.subscription” event in these renewal cases? I couldn’t find anything that provides me with this identification, because this first payload comes exactly as a 1 month subscription, without the “cumulative\_months”, and when the user shares the message I receive the “cumulative\_months” information correctly.

```auto
{
    "broadcaster_user_id": "123",
    "user_name": "acb",
    "user_input": "",
    "message": "",
    "is_anonymous": false,
    "bits": 0,
    "tier": "1000",
    "is_gift": false,
    "cumulative_months": 1,
    "reward": {}
}

```

```auto
{
    "broadcaster_user_id": "123",
    "user_name": "acb",
    "user_input": "",
    "message": {
        "text": "",
        "emotes": null
    },
    "is_anonymous": false,
    "bits": 0,
    "tier": "1000",
    "is_gift": false,
    "cumulative_months": 13,
    "reward": {}
}

```

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 3, 2023, 2:20am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-events-for-sub-resub/42646/2 "2023-01-03T02:20:00Z")

</div>

> [@raylanprime](#):
>
> Is there any way to identify this first “channel.subscription” event in these renewal cases?

TLDR: no

`channel.subscribe` topic is “user changed from non sub to a sub”, regardless of what reason that is for. Not a direct reflection of an _event in chat_ where as `channel.subscription.message` is “user sent a message in chat as part of their resub notification”

So for prime resubs you’ll get them at the same time _ish_.  
But for _regular_ people _restaritng_ a sub you’ll have _un1known time_ between the duplicates

There are a couple of user voices open in this regard to figure out ways to improve eventsub for overlay providers.

> [@raylanprime](#):
>
> (I believe it is at the time of payment)

Theres where you are mistaken this topic is for the user changed from non sub to sub for any reason. not _only_ for the first payment the user makes.

Hope that clears it up!

---

<div class="post-metadata">

**Author:** ![raylanprime](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@raylanprime](https://staging-discuss.dev.twitch.com/u/raylanprime)\
**Post date:** [January 3, 2023, 11:46am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-events-for-sub-resub/42646/3 "2023-01-03T11:46:05Z")

</div>

Understood, thanks for the clarification!

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [February 2, 2023, 11:46am UTC](https://staging-discuss.dev.twitch.com/t/eventsub-events-for-sub-resub/42646/4 "2023-02-02T11:46:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
