API ReferenceSubscriptions
View subscription capabilities
Check which lifecycle actions are currently available for a subscription.
Use this endpoint before showing subscription management actions in your own UI.
AuthorizationBearer <token>
Provide your SellApp API key as a bearer token.
In: header
Path Parameters
productSubscription*integer
The productSubscription path parameter.
Header Parameters
X-STORE?string
Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://sell.app/api/v2/subscriptions/0/capabilities" \ -H "X-STORE: launch-lab"{
"data": {
"id": 55,
"subscription_id": "sub_1QwertyExample",
"capabilities": {
"pause": {
"status": "available",
"customer_reason": null,
"seller_reason": null
},
"resume": {
"status": "unsupported",
"customer_reason": "This subscription is not paused.",
"seller_reason": "This subscription is not paused."
},
"cancel_at_period_end": {
"status": "available",
"customer_reason": null,
"seller_reason": null
},
"cancel_immediately": {
"status": "available",
"customer_reason": null,
"seller_reason": null
},
"update_payment_method": {
"status": "customer_only",
"customer_reason": null,
"seller_reason": "Customers update their own payment method from the customer portal."
},
"change_plan": {
"status": "customer_only",
"customer_reason": null,
"seller_reason": "Customers change subscription plans from the customer portal."
},
"shift_billing_date": {
"status": "unsupported",
"customer_reason": "Changing the next renewal date is not available for this Stripe subscription.",
"seller_reason": "Stripe does not support arbitrary next-renewal-date changes for existing subscriptions through this provider flow."
}
}
}
}{
"type": "invalid_request_error",
"code": "bad_request",
"message": "The request could not be understood.",
"status": 400,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#bad-request"
}{
"type": "authentication_error",
"code": "unauthenticated",
"message": "Unauthenticated.",
"status": 401,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#unauthenticated"
}{
"type": "authorization_error",
"code": "forbidden",
"message": "This action is unauthorized.",
"status": 403,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#forbidden"
}{
"type": "not_found_error",
"code": "resource_not_found",
"message": "Not Found.",
"status": 404,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#resource-not-found"
}{
"type": "validation_error",
"code": "validation_failed",
"message": "The selected product variant id is invalid.",
"status": 422,
"param": "product_variant_id",
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#validation-failed",
"errors": {
"product_variant_id": [
"The selected product variant id is invalid."
]
}
}{
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Too Many Attempts.",
"status": 429,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#rate-limit-exceeded"
}{
"type": "api_error",
"code": "api_error",
"message": "Server Error",
"status": 500,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#api-error"
}