Subscriptions
Aggregated usage + computed line amounts for a cycle
selectkey<token>
API key para requisições autenticadas. Envie sua chave no cabeçalho selectkey (sandbox sk_test_…, produção sk_live_…).
In: header
Path Parameters
subscriptionId*string
Public identifier (subs_/sub_…)
cycleId*string
Public identifier (scy_/cycle_…)
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/subscriptions/string/cycles/string/usage"{
"cycleId": "scy_0a1b2c3d4e5f60718293",
"windowStart": "string",
"windowEnd": "string",
"billedAmount": 5000,
"currency": "BRL",
"aggregatedByItem": [
{
"itemId": "sit_0a1b2c3d4e5f60718293",
"name": "Acme Ltda",
"meterEventName": "string",
"usage": 0,
"lineAmount": 5000
}
],
"totalUsageAmount": 5000
}{
"error": {
"status": "Unauthorized",
"statusCode": 401,
"category": "authentication",
"code": "unauthorized",
"message": "Authentication is required to access this resource.",
"resource": "server"
}
}{
"error": {
"status": "Forbidden",
"statusCode": 403,
"category": "authorization",
"code": "forbidden",
"message": "You do not have permission to perform this action.",
"resource": "server"
}
}{
"error": {
"status": "Internal Server Error",
"statusCode": 500,
"category": "server",
"code": "notFound",
"message": "An unexpected error occurred.",
"resource": "server"
}
}{
"error": {
"status": "Internal Server Error",
"statusCode": 500,
"category": "server",
"code": "serverError",
"message": "An unexpected error occurred. Please try again later.",
"resource": "server",
"details": "If the problem persists, contact support with the correlationId from the response headers."
}
}