What is sub_plan

After checking if a user has Subscribed to my channel i get “sub_plan” in the result.

Can someone explain me what this is?

Example “sub_plan”:“1000”


sub_plan is essentially what tier sub a user has. These are the current valid values:

public enum
    /// <summary>
    /// Invalid subscription plan.
    /// </summary>
    [EnumMember(Value = "")]
    None    = 0,

    /// <summary>
    /// Free Twitch Prime subscription.
    /// Equivelent <see cref="Tier1"/>
    /// </summary>
    [EnumMember(Value = "Prime")]
    Prime   = 1,

    /// <summary>
    /// $4.99 subsctiption plan.
    /// </summary>
    [EnumMember(Value = "1000")]
    Tier1   = 1000,

    /// <summary>
    /// $9.99 subsctiption plan.
    /// </summary>
    [EnumMember(Value = "2000")]
    Tier2   = 2000,

    /// <summary>
    /// $24.99 subsctiption plan.
    /// </summary>
    [EnumMember(Value = "3000")]
    Tier3   = 3000

Just as a note: None, or "",is not actually a valid value. That’s an custom enum value in my library intended for internal use and is not a response sent by Twitch.

1 Like

Thanks for the fast awnser :slightly_smiling_face:

But thats a litte bit wired :confused:

My test account subed with prime and gets the value 1000 not 1

I probably should have just posted the strings sent by Twitch and not an enum to avoid confusion. Ignore the enum values since those are for the purpose of the language. The values you should only care about are:

Prime // Twitch prime
1000  // $4.99
2000  // $9.99
3000  // $24.99
1 Like

As I said, I get the value/string 1000 and not prime and that is a litte bit confusing

My best guess is that since at a base level Twitch considered Prime and $4.99 subs to be the same, they return 1000 for both. In IRC, they actually differentiate between Prime and a normal sub, so I’m not sure why it would be different with the API.

1 Like

Yea a little bit confusing, but thanks for the help :slight_smile:

1 Like

No problem :smiley:

Hopefully when the Helix endpoint for subscriptions is added things will be a bit better than v5, as not being able to differentiate between Prime and $4.99 subs through the API is one of several issues right now with subscriptions.

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