Details about the user's subscription state.

interface WKUserSubscription {
    active: boolean;
    max_level_granted: 3 | 60;
    period_ends_at: null | WKDatableString;
    type:
        | "free"
        | "lifetime"
        | "recurring"
        | "unknown";
}

Properties

active: boolean

Whether or not the user currently has a paid subscription.

max_level_granted: 3 | 60

The maximum level of content accessible to the user for lessons, reviews, and content review. For unsubscribed/free users, the maximum level is 3. For subscribed users, this is 60.

Any application that uses data from the WaniKani API must respect these access limits.

period_ends_at: null | WKDatableString

The date when the user's subscription period ends. If the user has subscription type lifetime or free then the value is null.

type:
    | "free"
    | "lifetime"
    | "recurring"
    | "unknown"

The type of subscription the user has. Options are following: free, recurring, and lifetime. A type of unknown means the user subscription state isn't exactly known. This is a weird state on WaniKani, should be treated as free, and reported to the WaniKani developers.