Get the add-ons package and SMS credit balance
get
https://api.expiryedge.com/v1/addonsany role60/min
Request
curl 'https://api.expiryedge.com/v1/addons' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY"Response
{
"period": "month",
"status": "active",
"cancel_at_period_end": false,
"pending": null,
"has_subscription": true,
"items": {
"expiries": {
"label": "Extra Expiries",
"unit_size": 50,
"quantity": 2,
"base_limit": 500,
"limit": 600,
"usage": 540,
"prices": {
"month": {
"unit_amount": 500,
"currency": "USD",
"display": "5.00"
},
"year": {
"unit_amount": 5000,
"currency": "USD",
"display": "50.00"
}
}
}
},
"sms_credits": {
"block_size": 50,
"balance": 120,
"total_purchased": 200,
"plan_balance": 15,
"price": {
"unit_amount": 1000,
"currency": "USD",
"display": "10.00"
}
}
}Shows each add-on's purchased quantity, limits, usage and Stripe prices, plus rollover SMS/WhatsApp credits.
200
Current add-ons state.
periodstringAllowedmonthyearstatusstringStripe status of the add-ons subscription, ornone.cancel_at_period_endbooleanpendingmap of integer | nullQuantities awaiting Checkout completion.has_subscriptionbooleanitemsmap of objectKeyed by add-on key.sms_creditsobject
400 | The user has no organization. |
401 | Missing, expired or invalid bearer token. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
500 | Unexpected server error. Retry later; quote requestId to support. |
