PurchaseStatus
SolvaPay SDK / react/src / PurchaseStatus
Interface: PurchaseStatus
Defined in: packages/react/src/types/index.ts:48
Properties
activePaidPurchase
activePaidPurchase:
PurchaseInfo|null
Defined in: packages/react/src/types/index.ts:72
Most recent active paid purchase (sorted by startDate) Returns purchase with status === 'active' and amount > 0. null if no active paid purchase exists
activePurchase
activePurchase:
PurchaseInfo|null
Defined in: packages/react/src/types/index.ts:60
Primary active purchase (paid or free) - most recent purchase with status === 'active' Backend keeps purchases as 'active' until expiration, even when cancelled. null if no active purchase exists
customerRef?
optionalcustomerRef:string
Defined in: packages/react/src/types/index.ts:50
email?
optionalemail:string
Defined in: packages/react/src/types/index.ts:51
hasPaidPurchase
hasPaidPurchase:
boolean
Defined in: packages/react/src/types/index.ts:66
Check if user has any active paid purchase (amount > 0) Checks purchases with status === 'active'. Backend keeps purchases as 'active' until expiration, even when cancelled.
hasPlan()
hasPlan: (
planName) =>boolean
Defined in: packages/react/src/types/index.ts:54
Parameters
planName
string
Returns
boolean
loading
loading:
boolean
Defined in: packages/react/src/types/index.ts:49
name?
optionalname:string
Defined in: packages/react/src/types/index.ts:52
purchases
purchases:
PurchaseInfo[]
Defined in: packages/react/src/types/index.ts:53