Get the add-ons package and SMS credit balance

gethttps://api.expiryedge.com/v1/addons
any role60/min
Anfrage
curl 'https://api.expiryedge.com/v1/addons' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY"
Antwort
{
  "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.

Rückgabe

200
Current add-ons state.
  • periodstring
    Erlaubtmonthyear
  • statusstring
    Stripe status of the add-ons subscription, or none.
  • cancel_at_period_endboolean
  • pendingmap of integer | null
    Quantities awaiting Checkout completion.
  • has_subscriptionboolean
  • itemsmap of object
    Keyed by add-on key.
  • sms_creditsobject

Fehler

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.