Current billing state.
const url = 'https://api.siteqwality.com/billing/overview';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siteqwality.com/billing/overview \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Current billing state
object
Stripe’s own subscription status, or null when the account has never
subscribed. Deliberately the raw Stripe string rather than our internal
enum: this screen exists to show what Stripe thinks.
Unix seconds. Set when a cancellation is scheduled.
Unix seconds. Read off the first subscription ITEM, not the
subscription: Stripe moved period boundaries onto items in the API
version this SDK pins, and Subscription no longer carries them.
What Stripe charges: the subscription’s default, else the customer’s. Any type, not only cards.
object
Stripe’s payment method type: card, link, us_bank_account, …
How to name it, for example “Visa ending 4242” or “Link (pat@example.com)”.
Card brand; empty for other types.
Cards only.
The method Stripe charges: the subscription’s default, else the customer’s.
True once the card’s expiry month has passed. Surfaced so the list can flag it before a renewal fails rather than after.
Example generated
{ "status": "example", "cancel_at_period_end": true, "cancel_at": 1, "current_period_end": 1, "default_payment_method": { "id": "example", "type": "example", "label": "example", "brand": "example", "last4": "example", "exp_month": 1, "exp_year": 1, "is_default": true, "is_expired": true }}Missing or invalid authentication
Caller has no billing role
Internal server error