Checks the current usage balance for a given plan.
cURL
curl --request GET \ --url http://sandbox.mintlify.com/plan/{planId}/balance \ --header 'Authorization: Bearer <token>'
{ "isSubscriber": true, "total": 123, "used": 123, "remaining": 123 }
const balance = await payments.getPlanBalance(planId) // OR if you provide the address of a different user const balance = await payments.getPlanBalance(planId, userAddress)
{ "isSubscriber": "boolean", "total": "number", "used": "number", "remaining": "number" }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The unique identifier of the plan.
Balance information