List all subscriptions for the current organization
GET
/api/v1/billing/subscriptions
const url = 'https://api.yggy.tech/api/v1/billing/subscriptions';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.yggy.tech/api/v1/billing/subscriptions \ --header 'Authorization: Bearer <token>'Returns all subscriptions (active, canceled, ended, etc.) for the organization. Useful for subscription history.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”List of subscriptions
Media type application/json
object
subscriptions
required
Array<object>
object
id
required
string
plan
required
string
referenceId
required
string
status
required
string | null
stripeCustomerId
required
string | null
stripeSubscriptionId
required
string | null
currentPriceId
required
string | null
periodStart
required
string | null
periodEnd
required
string | null
trialStart
required
string | null
trialEnd
required
string | null
cancelAtPeriodEnd
required
boolean | null
cancelAt
required
string | null
canceledAt
required
string | null
endedAt
required
string | null
seats
required
number | null
memberCount
required
number | null
graceEndsAt
required
While a payment is overdue: when the paid plan ends unless a payment succeeds
string | null
Example generated
{ "subscriptions": [ { "id": "example", "plan": "example", "referenceId": "example", "status": "example", "stripeCustomerId": "example", "stripeSubscriptionId": "example", "currentPriceId": "example", "periodStart": "example", "periodEnd": "example", "trialStart": "example", "trialEnd": "example", "cancelAtPeriodEnd": true, "cancelAt": "example", "canceledAt": "example", "endedAt": "example", "seats": 1, "memberCount": 1, "graceEndsAt": "example" } ]}No active organization
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Not authenticated
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Server error
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}