Credits
List Customer Credit Grants
Retrieve all credit grants for a specific customer. Supports filtering by status and application type.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Path Parameters
customerId*string
Customer ID
Match
^cus_[A-Za-z0-9]{22}$Query Parameters
status?string
Filter by grant status
Value in
"ACTIVE" | "DEPLETED" | "EXPIRED" | "REVOKED"applicationType?string
Filter by application type
Value in
"usage" | "monetary"Response Body
application/json
application/json
curl -X GET "https://api.getlumen.dev/v1/credits/customers/string/grants"{
"grants": [
{
"id": "string",
"merchantId": "string",
"customerId": "string",
"creditDefinitionId": "string",
"applicationType": "usage",
"initialAmount": 0,
"remainingAmount": 0,
"status": "ACTIVE",
"source": "subscription",
"featureId": "string",
"featureSlug": "string",
"priceId": "string",
"priceComponentId": "string",
"currency": "string",
"startDate": "2019-08-24T14:15:22Z",
"expiryDate": "2019-08-24T14:15:22Z",
"referenceCode": "string",
"notes": "string",
"priority": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Failed to fetch customer credit grants"
}