Subscription

Represents a user's subscription to a subscription product. The subscription ID is the same as the user ID of the user who subscribed.

Attributes

pathstring

The resource path of the subscription.

Format: universes/{universe_id}/subscription-products/{subscription_product_id}/subscriptions/{subscription_id}.

createTimestring
Output Only

The timestamp when the subscription was created. This string is formatted as a Timestamp.

updateTimestring
Output Only

The timestamp when the subscription was last updated. This string is formatted as a Timestamp.

activeboolean
Output Only

Whether the subscription is active.

This is equivalent to whether state is equal to SUBSCRIBED_WILL_RENEW, SUBSCRIBED_WILL_NOT_RENEW, or SUBSCRIBED_RENEWAL_PAYMENT_PENDING.

willRenewboolean
Output Only

Whether the subscription will renew.

This is equivalent to whether state is equal to SUBSCRIBED_WILL_RENEW or SUBSCRIBED_RENEWAL_PAYMENT_PENDING.

lastBillingTimestring
Output Only

The timestamp when the subscription was last billed. This string is formatted as a Timestamp.

nextRenewTimestring
Output Only

The timestamp when the subscription will next be automatically renewed. This string is formatted as a Timestamp.

expireTimestring
Output Only

The timestamp when the subscription will, or did, expire. This string is formatted as a Timestamp.

stateEnum<string>
Output Only

The state of the subscription.

Possible values:

ValueDescription
STATE_UNSPECIFIEDThe subscription state is unspecified.
SUBSCRIBED_WILL_RENEWThe subscription is active and will be automatically renewed at next_renew_time.
SUBSCRIBED_WILL_NOT_RENEWThe subscription is active but will not be automatically renewed.
SUBSCRIBED_RENEWAL_PAYMENT_PENDINGThe subscription is active and within the renewal grace period pending payment confirmation.
EXPIREDThe subscription has expired. See expiration_details for more information.
expirationDetailsobject

Information about the expiration of the subscription.

purchasePlatformEnum<string>
Output Only

The platform on which the subscription was purchased.

Possible values:

ValueDescription
PURCHASE_PLATFORM_UNSPECIFIEDThe purchase platform is unspecified.
DESKTOPThe subscription was purchased on the Roblox website.
MOBILEThe subscription was purchased on the Roblox mobile app.
paymentProviderEnum<string>
Output Only

The payment provider used to purchase the subscription.

Possible values:

ValueDescription
PAYMENT_PROVIDER_UNSPECIFIEDThe payment provider is unspecified.
STRIPEThe subscription was purchased using Stripe.
APPLEThe subscription was purchased using Apple.
GOOGLEThe subscription was purchased using Google.
ROBLOX_CREDITThe subscription was purchased using Roblox Credit.
userstring
Immutable

The user who subscribed to the subscription.

Base URL

https://apis.roblox.com
The Subscription Resource

{
"path": "universes/123/subscription-products/some-subscription-product-id/subscriptions/some-subscription-id",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"active": true,
"willRenew": true,
"lastBillingTime": "2023-07-05T12:34:56Z",
"nextRenewTime": "2023-07-05T12:34:56Z",
"expireTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"expirationDetails": {
"reason": "EXPIRATION_REASON_UNSPECIFIED"
},
"purchasePlatform": "PURCHASE_PLATFORM_UNSPECIFIED",
"paymentProvider": "PAYMENT_PROVIDER_UNSPECIFIED",
"user": "users/123"
}

Subscription

Get Subscription
Beta

GET /cloud/v2/universes/{universe_id}/subscription-products/{subscription_product_id}/subscriptions/{subscription_id}

Get the subscription.

The universe.subscription-product.subscription:read scope only allows you to get your own subscriptions—or rather, the subscription ID must match the user ID that makes the request—so its best use case is with OAuth 2.0 authentication rather than an API key. To read all subscriptions for a universe, use the universe:write scope.

Scopes
universe:writeuniverse.subscription-product.subscription:read
RequestPath Parameters
universe_idstring
Required

The universe ID.

subscription_product_idstring
Required

The subscription-product ID.

subscription_idstring
Required

The subscription ID.

Query Parameters
viewEnum<string>

The view in which to retrieve the subscription.

Supports BASIC and FULL.

Defaults to BASIC.

Possible values:

ValueDescription
VIEW_UNSPECIFIEDThe subscription view is not specified; the default will be used.
BASICIncludes only the active and renewing fields.
FULLIncludes all fields.
ResponseSubscription
GET /cloud/v2/universes/{universe_id}/subscription-products/{subscription_product_id}/subscriptions/{subscription_id}

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}/subscription-products/{subscription_product_id}/subscriptions/{subscription_id}?view={string}' \
-H 'x-api-key: {your-api-key}'
Response

{
"path": "universes/123/subscription-products/some-subscription-product-id/subscriptions/some-subscription-id",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"active": true,
"willRenew": true,
"lastBillingTime": "2023-07-05T12:34:56Z",
"nextRenewTime": "2023-07-05T12:34:56Z",
"expireTime": "2023-07-05T12:34:56Z",
"state": "STATE_UNSPECIFIED",
"expirationDetails": {
"reason": "EXPIRATION_REASON_UNSPECIFIED"
},
"purchasePlatform": "PURCHASE_PLATFORM_UNSPECIFIED",
"paymentProvider": "PAYMENT_PROVIDER_UNSPECIFIED",
"user": "users/123"
}