The
subscription.getStatus function retrieves the current status and details of a subscription created with spend permissions. Use this to check if a subscription is active, view remaining charges, and determine the next payment period.Parameters
The subscription ID (permission hash) returned from subscribe().Pattern:
^0x[0-9a-fA-F]{64}$Returns
Usage Patterns
- Check Before Charge
- Schedule Next Charge
- Display to User
Always check subscription status before attempting to charge:
Check Before Charge
Error Handling
The function may throw errors for invalid subscription IDs or network issues:Error Handling