Type Definition
Fields
Core Fields
| Field | Type | Description |
|---|---|---|
id | UUID! | Unique identifier for the credit grant |
grantId | String! | Auto-generated readable identifier |
displayName | String! | Display name for the grant |
grantType | CreditGrantType! | Type of grant (PROMOTIONAL, PAID, etc.) |
status | CreditGrantStatus! | Current status of the grant |
Amounts
| Field | Type | Description |
|---|---|---|
amount | Float! | Total credits in this grant |
consumedAmount | Float! | Credits already consumed |
cost | Money! | Fiat cost of this grant (for paid grants) |
Customer
| Field | Type | Description |
|---|---|---|
customerId | String! | Customer who received the grant |
resourceId | String | Resource this grant is scoped to |
Currency
| Field | Type | Description |
|---|---|---|
currencyId | String! | Custom currency ID for these credits |
Dates
| Field | Type | Description |
|---|---|---|
effectiveAt | DateTime! | When credits become available |
expireAt | DateTime | When credits expire |
voidedAt | DateTime | When the grant was voided |
createdAt | DateTime! | When the grant was created |
updatedAt | DateTime! | When the grant was last updated |
Invoice
| Field | Type | Description |
|---|---|---|
invoiceId | String | Associated invoice ID |
latestInvoice | CreditGrantInvoice | Latest invoice information |
Payment
| Field | Type | Description |
|---|---|---|
paymentCollection | PaymentCollection! | Payment collection status |
priority | Float! | Priority for credit consumption order |
Recharge
| Field | Type | Description |
|---|---|---|
automaticRechargeConfigurationId | UUID | ID of automatic recharge config that created this grant |
Metadata
| Field | Type | Description |
|---|---|---|
comment | String | Optional comment/note |
additionalMetaData | JSON | Custom metadata |
CreditGrantType Enum
| Value | Description |
|---|---|
PROMOTIONAL | Free promotional credits |
PAID | Credits purchased by customer |
ROLLOVER | Credits rolled over from previous period |
SUBSCRIPTION | Credits from subscription |
CreditGrantStatus Enum
| Value | Description |
|---|---|
PENDING | Grant is pending activation |
ACTIVE | Grant is active and credits available |
CONSUMED | All credits have been consumed |
EXPIRED | Grant has expired |
VOIDED | Grant was voided/cancelled |
CreditGrantCadence Enum
| Value | Description |
|---|---|
BEGINNING_OF_BILLING_PERIOD | Credits granted at start of billing period |
MONTHLY | Credits granted monthly |
Example Response
Active Credit Grant
Paid Credit Grant
Voided Credit Grant
Related Types
Related Operations
- Create Credit Grant - Grant credits
- Void Credit Grant - Cancel a grant
- Credit Balance - Query balance
- Credit Grants - List grants
- Credit Ledger - View transactions
