Credits
Revoke Credit Grant
Revoke an active credit grant. Sets remaining amount to 0 and status to REVOKED. Creates an audit trail transaction.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Path Parameters
id*string
Credit grant ID
Match
^cred_[A-Za-z0-9]+$Request Body
application/json
notes?string
Optional reason for revoking the grant
Response Body
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/credits/grants/string/revoke" \ -H "Content-Type: application/json" \ -d '{ "notes": "Customer requested cancellation" }'{
"grant": {
"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": "Credit grant not found"
}{
"error": "Failed to revoke credit grant"
}