Credits
List Credit Definitions
Retrieve all credit type definitions for the merchant. Credit definitions configure how credits are granted, applied, and renewed. Supports filtering by scope and application type.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Query Parameters
scope?string
Filter by credit scope
Value in
"component" | "price" | "plan" | "merchant"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/definitions"{
"definitions": [
{
"id": "cred_def_abc123def456ghi789",
"merchantId": "mer_abc123def456ghi789jkl",
"name": "API Call Credits",
"description": "Credits for API calls",
"scope": "plan",
"applicationType": "usage",
"planId": "plan_xyz789abc123def456",
"featureSlug": "max-api-calls",
"defaultAmount": 10000,
"refillAmount": 10000,
"expiryDays": 30,
"renewOnBilling": true,
"isActive": true,
"createdAt": "2024-01-15T10:30:00Z"
}
]
}{
"error": "Failed to fetch credit definitions"
}