Get a subscription.
Get a subscription
GET
/admin/v1/subscriptions/{subscriptionId}query parameters
Returns
The billing connection.
The plan.
The revision for the plan.
The items associated with plan.
The product associated with the item.
The connected products.
The basic view of the connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The price associated with the item.
The connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The product associated with the price.
The connected products.
The basic view of the connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The price is fixed per quantity.
The price is dependent on the quantity.
The subscription items.
The item product.
The connected products.
The basic view of the connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The item price.
The connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The product associated with the price.
The connected products.
The basic view of the connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The price is fixed per quantity.
The price is dependent on the quantity.
The seat information.
The seat product.
The connected products.
The basic view of the connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The payment method.
The last payment error.
This will be unset if the payment method is updated or if a payment succeeds.
Card payment method (e.g. Visa credit card).
The trial information for the subscription.
The organization owner of the subscription.
The user owner of the subscription.
curl https://api.userhub.com/admin/v1/subscriptions/sub_UBUqH64iKRBdCD \
-H "Authorization: Bearer $USERHUB_ADMIN_KEY"
const res = await adminApi.subscriptions.get(
"sub_UBUqH64iKRBdCD",
);
res, err := adminApi.Subscriptions().Get(
context.Background(),
"sub_UBUqH64iKRBdCD",
nil,
)
$res = $adminApi->subscriptions->get(
subscriptionId: 'sub_UBUqH64iKRBdCD',
);
res = admin_api.subscriptions.get(
subscription_id="sub_UBUqH64iKRBdCD",
)
{
"id": "sub_UBUqH64iKRBdCD",
"state": "ACTIVE",
"connection": {
"id": "conn_4HdRKnTvPmmjYK",
"displayName": "Stripe",
"state": "ACTIVE",
"type": "STRIPE",
"providers": [],
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"externalId": "sub_1PGhMaI1Zx1mDKAzigGeR4s9",
"plan": {
"id": "plan_2wnGzPMSrDBYK5:ukfHizos:monthly:usd",
"state": "AVAILABLE",
"uniqueId": "pro:ukfHizos:monthly:usd",
"displayName": "Pro",
"description": "The pro plan.",
"currencyCode": "USD",
"interval": {
"quantity": 1,
"unit": "MONTH"
},
"revision": {
"id": "plan_2wnGzPMSrDBYK5:ukfHizos"
},
"tags": [
"default"
],
"items": [
{
"type": "SEAT",
"product": {
"id": "pd_3fNK5BXs9C1Fdc",
"uniqueId": "pro-seat",
"displayName": "Pro seat",
"description": "The pro seat.",
"committed": true,
"archived": false,
"productConnections": [],
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"price": {
"id": "pr_HFULbg4GRQEkV6",
"externalId": "price_1O2TVHGZpdmtrghCgwyfbNIx",
"state": "ACTIVE",
"currencyCode": "USD",
"billingMode": "FIXED_TERM",
"interval": {
"quantity": 1,
"unit": "MONTH"
},
"fixed": {
"amount": "5"
},
"archived": false,
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
}
}
],
"view": "FULL"
},
"currencyCode": "USD",
"items": [
{
"id": "si_2iLgfJvq",
"product": {
"id": "pd_3fNK5BXs9C1Fdc",
"uniqueId": "pro-seat",
"displayName": "Pro seat",
"description": "The pro seat.",
"committed": true,
"archived": false,
"productConnections": [],
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"price": {
"id": "pr_HFULbg4GRQEkV6",
"externalId": "price_1O2TVHGZpdmtrghCgwyfbNIx",
"state": "ACTIVE",
"currencyCode": "USD",
"billingMode": "FIXED_TERM",
"interval": {
"quantity": 1,
"unit": "MONTH"
},
"product": {
"id": "pd_3fNK5BXs9C1Fdc",
"uniqueId": "pro-seat",
"displayName": "Pro seat",
"description": "The pro seat.",
"committed": true,
"archived": false,
"productConnections": [],
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"fixed": {
"amount": "5"
},
"archived": false,
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"quantity": 1
}
],
"seats": [
{
"state": "PROVISIONABLE",
"product": {
"id": "pd_3fNK5BXs9C1Fdc",
"uniqueId": "pro-seat",
"displayName": "Pro seat",
"description": "The pro seat.",
"committed": true,
"archived": false,
"productConnections": [],
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"currentQuantity": 1,
"assignedQuantity": 1,
"unassignedQuantity": 0,
"totalQuantity": 1
}
],
"anchorTime": "2025-05-15T13:00:00Z",
"startTime": "2025-05-15T13:00:00Z",
"currentPeriod": {
"startTime": "2025-05-15T13:00:00Z",
"endTime": "2025-06-15T13:00:00Z"
},
"organization": {
"id": "org_28seyVGVL1got6",
"state": "ACTIVE",
"displayName": "Acme Inc",
"email": "[email protected]",
"emailVerified": true,
"imageUrl": "https://example.com/acme.jpg",
"accountConnections": [],
"signupTime": "2025-05-15T13:00:00Z",
"memberCount": 1,
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"default": true,
"view": "FULL",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
}