SubscriptionStatus
SolvaPay SDK / react/src / SubscriptionStatus
Interface: SubscriptionStatus
Defined in: packages/react/src/types/index.ts:35
Properties
activePaidSubscription
activePaidSubscription:
SubscriptionInfo|null
Defined in: packages/react/src/types/index.ts:59
Most recent active paid subscription (sorted by startDate) Returns subscription with status === 'active' and amount > 0. null if no active paid subscription exists
activeSubscription
activeSubscription:
SubscriptionInfo|null
Defined in: packages/react/src/types/index.ts:47
Primary active subscription (paid or free) - most recent subscription with status === 'active' Backend keeps subscriptions as 'active' until expiration, even when cancelled. null if no active subscription exists
customerRef?
optionalcustomerRef:string
Defined in: packages/react/src/types/index.ts:37
email?
optionalemail:string
Defined in: packages/react/src/types/index.ts:38
hasPaidSubscription
hasPaidSubscription:
boolean
Defined in: packages/react/src/types/index.ts:53
Check if user has any active paid subscription (amount > 0) Checks subscriptions with status === 'active'. Backend keeps subscriptions as 'active' until expiration, even when cancelled.
hasPlan()
hasPlan: (
planName) =>boolean
Defined in: packages/react/src/types/index.ts:41
Parameters
planName
string
Returns
boolean
loading
loading:
boolean
Defined in: packages/react/src/types/index.ts:36
name?
optionalname:string
Defined in: packages/react/src/types/index.ts:39
subscriptions
subscriptions:
SubscriptionInfo[]
Defined in: packages/react/src/types/index.ts:40