Get Subscription
GET/organizations/:organizationId/subscription
Get Subscription
Request
Path Parameters
organizationId stringrequired
The ID of organization.
Responses
- 200
- 400
- 401
- 403
- 404
- 422
- application/json
- Schema
- Example (from schema)
- Example
Schema
data objectrequired
Data of the organization subscription.
organizationIdd stringrequired
plan objectrequired
active booleanrequired
aggregate_usage stringrequired
amount numberrequired
amount_decimal stringrequired
billing_scheme stringrequired
created_at numberrequired
currency stringrequired
id stringrequired
interval stringrequired
interval_count numberrequired
livemode booleanrequired
metadata objectrequired
nickname stringrequired
object stringrequired
product stringrequired
tiers_mode stringrequired
transform_usage objectrequired
trial_period_days numberrequired
usage_type stringrequired
planId stringrequired
price objectrequired
active booleanrequired
billing_scheme stringrequired
created_at numberrequired
currency stringrequired
custom_unit_amount stringrequired
id stringrequired
livemode booleanrequired
lookup_key stringrequired
metadata objectrequired
nickname stringrequired
object stringrequired
product stringrequired
recurring objectrequired
aggregate_usage stringrequired
interval stringrequired
interval_count numberrequired
usage_type stringrequired
tax_behavior stringrequired
tiers_mode numberrequired
transform_quantity objectrequired
type stringrequired
unit_amount numberrequired
unit_amount_decimal stringrequired
priceId stringrequired
status stringrequired
subscription objectrequired
application stringrequired
application_fee_percent stringrequired
automatic_tax objectrequired
enabled objectrequired
liability objectrequired
billing_cycle_anchor numberrequired
billing_cycle_anchor_config stringrequired
billing_thresholds stringrequired
canceled_at stringrequired
cancellation_details objectrequired
comment stringrequired
feedback stringrequired
reason stringrequired
cancel_at stringrequired
cancel_at_period_end booleanrequired
collection_method stringrequired
created numberrequired
currency stringrequired
current_period_end numberrequired
current_period_start numberrequired
days_until_due stringrequired
default_payment_method stringrequired
default_source stringrequired
default_tax_rates stringrequired
description stringrequired
discount stringrequired
ended_at stringrequired
invoice_settings objectrequired
account_tax_ids stringrequired
issuer objectrequired
type stringrequired
lastest_invoice stringrequired
livemode booleanrequired
metadata objectrequired
next_pending_invoice_item_invoice stringrequired
object stringrequired
on_behalf_of stringrequired
pause_collection stringrequired
payment_settings objectrequired
payment_method_options stringrequired
payment_method_types stringrequired
save_default_payment_method stringrequired
pending_invoice_item_interval stringrequired
pending_setup_intent stringrequired
pending_update stringrequired
quantity numberrequired
schedule stringrequired
start_date numberrequired
status stringrequired
test_clock stringrequired
transfer_data stringrequired
trial_end numberrequired
trial_settings objectrequired
end_behavior objectrequired
missing_payment_method stringrequired
trial_start numberrequired
subscriptionId stringrequired
createdAtDateString stringrequired
createdAt numberrequired
updatedAtDateString stringrequired
updatedAt numberrequired
{
"data": {
"organizationIdd": "string",
"plan": {
"active": true,
"aggregate_usage": "string",
"amount": 0,
"amount_decimal": "string",
"billing_scheme": "string",
"created_at": 0,
"currency": "string",
"id": "string",
"interval": "string",
"interval_count": 0,
"livemode": true,
"metadata": {},
"nickname": "string",
"object": "string",
"product": "string",
"tiers_mode": "string",
"transform_usage": {},
"trial_period_days": 0,
"usage_type": "string"
},
"planId": "string",
"price": {
"active": true,
"billing_scheme": "string",
"created_at": 0,
"currency": "string",
"custom_unit_amount": "string",
"id": "string",
"livemode": true,
"lookup_key": "string",
"metadata": {},
"nickname": "string",
"object": "string",
"product": "string",
"recurring": {
"aggregate_usage": "string",
"interval": "string",
"interval_count": 0,
"usage_type": "string"
},
"tax_behavior": "string",
"tiers_mode": 0,
"transform_quantity": {},
"type": "string",
"unit_amount": 0,
"unit_amount_decimal": "string"
},
"priceId": "string",
"status": "string",
"subscription": {
"application": "string",
"application_fee_percent": "string",
"automatic_tax": {
"enabled": {},
"liability": {}
},
"billing_cycle_anchor": 0,
"billing_cycle_anchor_config": "string",
"billing_thresholds": "string",
"canceled_at": "string",
"cancellation_details": {
"comment": "string",
"feedback": "string",
"reason": "string"
},
"cancel_at": "string",
"cancel_at_period_end": true,
"collection_method": "string",
"created": 0,
"currency": "string",
"current_period_end": 0,
"current_period_start": 0,
"days_until_due": "string",
"default_payment_method": "string",
"default_source": "string",
"default_tax_rates": "string",
"description": "string",
"discount": "string",
"ended_at": "string",
"invoice_settings": {
"account_tax_ids": "string",
"issuer": {
"type": "string"
}
},
"lastest_invoice": "string",
"livemode": true,
"metadata": {},
"next_pending_invoice_item_invoice": "string",
"object": "string",
"on_behalf_of": "string",
"pause_collection": "string",
"payment_settings": {
"payment_method_options": "string",
"payment_method_types": "string",
"save_default_payment_method": "string"
},
"pending_invoice_item_interval": "string",
"pending_setup_intent": "string",
"pending_update": "string",
"quantity": 0,
"schedule": "string",
"start_date": 0,
"status": "string",
"test_clock": "string",
"transfer_data": "string",
"trial_end": 0,
"trial_settings": {
"end_behavior": {
"missing_payment_method": "string"
}
},
"trial_start": 0
},
"subscriptionId": "string",
"createdAtDateString": "string",
"createdAt": 0,
"updatedAtDateString": "string",
"updatedAt": 0
}
}
{
"data": {
"organizationId": "o-organizationId",
"createdAt": 1704067200000,
"customerId": "cus_PoBsnxxxxxxxxxxE",
"plan": {
"active": true,
"aggregate_usage": null,
"amount": 60000,
"amount_decimal": "60000",
"billing_scheme": "per_unit",
"created": 1710000000,
"currency": "usd",
"id": "price_1OwL8xxxxxxxxxx6",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {
"LOL": "PEANUT"
},
"nickname": null,
"object": "plan",
"product": {
"active": true,
"attributes": [],
"created": 1710000000,
"default_price": "price_1OwL85xxxxxxxxxx6",
"description": "Regular plan with limitations",
"features": [
{
"name": "No priority support"
}
],
"id": "prod_PlstGxxxxxxxxxxTM",
"images": [
"https://files.stripe.com/links/xxxxxxxxxx"
],
"livemode": false,
"metadata": {
"MAX_LIMIT_DECK": "3"
},
"name": "Basic Plan",
"object": "product",
"package_dimensions": null,
"shippable": null,
"statement_descriptor": null,
"tax_code": "txcd_10103001",
"type": "service",
"unit_label": null,
"updated": 1720000000,
"url": null
},
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"planId": "price_1OwL8xxxxxxxxxx6",
"price": {
"active": true,
"billing_scheme": "per_unit",
"created": 1710000000,
"currency": "usd",
"custom_unit_amount": null,
"id": "price_1OwL8xxxxxxxxxx6",
"livemode": false,
"lookup_key": null,
"metadata": {
"LOL": "PEANUT"
},
"nickname": null,
"object": "price",
"product": "prod_PlstGxxxxxxxxxxM",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 60000,
"unit_amount_decimal": "60000"
},
"priceId": "price_1OwL8xxxxxxxxxx6",
"status": "trialing",
"subscription": {
"application": null,
"application_fee_percent": null,
"automatic_tax": {
"enabled": false,
"liability": null
},
"billing_cycle_anchor": 1720000000,
"billing_cycle_anchor_config": null,
"billing_thresholds": null,
"canceled_at": null,
"cancellation_details": {
"comment": null,
"feedback": null,
"reason": null
},
"cancel_at": null,
"cancel_at_period_end": false,
"collection_method": "charge_automatically",
"created": 1710000000,
"currency": "usd",
"current_period_end": 1720000000,
"current_period_start": 1710000000,
"days_until_due": null,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
"description": null,
"discount": null,
"ended_at": null,
"invoice_settings": {
"account_tax_ids": null,
"issuer": {
"type": "self"
}
},
"latest_invoice": "in_1OyZUxxxxxxxxxxt",
"livemode": false,
"metadata": {},
"next_pending_invoice_item_invoice": null,
"object": "subscription",
"on_behalf_of": null,
"pause_collection": null,
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null,
"save_default_payment_method": "off"
},
"pending_invoice_item_interval": null,
"pending_setup_intent": "seti_1OyZUxxxxxxxxxxV",
"pending_update": null,
"quantity": 1,
"schedule": null,
"start_date": 1710000000,
"status": "trialing",
"test_clock": "clock_1OymAxxxxxxxxxx9",
"transfer_data": null,
"trial_end": 1720000000,
"trial_settings": {
"end_behavior": {
"missing_payment_method": "cancel"
}
},
"trial_start": 1710000000
},
"subscriptionId": "sub_1OyZUxxxxxxxxxxX",
"createdAtDateString": "2024-01-01T00:00:00.000Z",
"created": 1720000000000,
"updatedAtDateString": "2024-01-31T00:00:00.000Z",
"updatedAt": 1720000000000
}
}
The request has invalid data.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The request has invalid data.
message stringrequired
The request has invalid data message.
{
"error": "string",
"message": "string"
}
{
"error": "Bad Request",
"message": "The request cannot be processed due to a bad request."
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The request has not permission.
message stringrequired
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Unauthenticated",
"message": "Authentication is required and has failed or has not yet been provided."
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The request has not permission.
message stringrequired
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Forbidden",
"message": "Access to the requested resource is forbidden."
}
The resource hasn't found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The resource hasn't found.
message stringrequired
The resource hasn't found message.
{
"error": "string",
"message": "string"
}
{
"error": "ResourceNotFound",
"message": "The requested resource could not be found."
}
The input data has invalid.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The input data has invalid.
message stringrequired
The input data has invalid message.
{
"error": "string",
"message": "string"
}
{
"error": "ValidationError",
"message": "Input data validation failed."
}
Loading...