List active subscription items
const url = 'https://api.strent.dev/v1/active_items/list';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"stripe_customer_id":"cus_123"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.strent.dev/v1/active_items/list \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "stripe_customer_id": "cus_123" }'Returns Stripe-like active subscription items: the items of subscriptions Stripe reports as active, trialing, or past_due. A non-empty list means the customer has an active subscription. Derive product-specific and price-specific plan facts from the returned product and price IDs; resolve several checks from one list instead of one request per check.
This read-only POST operation is side-effect-free and semantically safe to retry, but clients should not retry automatically by default.
Authorizations
Section titled “ Authorizations ”Request Bodyrequired
Section titled “ Request Bodyrequired ”object
Example
{ "stripe_customer_id": "cus_123"}Responses
Section titled “ Responses ”The customer projection is ready.
object
object
object
object
Example
{ "data": [ { "subscription": "sub_123", "id": "si_123", "price": { "id": "price_pro_monthly", "lookup_key": "pro_monthly", "product": { "id": "prod_pro" } }, "quantity": 1 } ]}The request body is invalid.
object
object
object
Example
{ "error": { "code": "VALIDATION_FAILED", "message": "The request body is invalid.", "requestId": "req_123" }}The Authorization header or project API key is invalid.
object
object
object
Example
{ "error": { "code": "INVALID_AUTH_HEADER", "message": "The Authorization header or project API key is invalid.", "requestId": "req_123" }}The project API key has been revoked.
object
object
object
Example
{ "error": { "code": "API_KEY_REVOKED", "message": "The project API key has been revoked.", "requestId": "req_123" }}The requested projection is not ready.
object
object
object
Example
{ "error": { "code": "CUSTOMER_STATE_NOT_READY", "message": "The requested projection is not ready.", "requestId": "req_123" }}The request body is too large.
object
object
object
Example
{ "error": { "code": "VALIDATION_FAILED", "message": "The request body is too large.", "requestId": "req_123" }}The request failed.
object
object
object
Example
{ "error": { "code": "VALIDATION_FAILED", "message": "The request failed.", "requestId": "req_123" }}The project or pre-authentication rate limit was exceeded.
object
object
object
Example
{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "The project or pre-authentication rate limit was exceeded.", "requestId": "req_123" }}Headers
Section titled “ Headers ”Seconds before another request is advised.
Strent could not complete the request.
object
object
object
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Strent could not complete the request.", "requestId": "req_123" }}