Documentation Index
Fetch the complete documentation index at: https://alguna.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Credit Grants
Credit grants allow you to allocate credits to customer accounts. This guide covers creating, managing, and tracking credit grants.Creating a Credit Grant
From the Dashboard
- Navigate to Customers and select a customer
- Click the Credits tab
- Click Add Credit Grant
- Fill in the grant details:
| Field | Description | Required |
|---|---|---|
| Type | Monetary or Units | Yes |
| Amount | Credit value or quantity | Yes |
| Currency | Currency code (for monetary) | Yes (monetary) |
| Expiration Date | When credits expire | No |
| Priority | Consumption order (lower = first) | No |
| Description | Internal note | No |
- Click Create Grant
Via API
Grant Types
Monetary Credits
Monetary credits are applied directly to invoices as a payment method.- Must specify a currency
- Applied at invoice payment time
- Reduces the amount due
- Appears as “Credit Applied” on invoice
Unit Credits
Unit credits are consumed against usage-based products and metrics.- Can be tied to a specific metric
- Consumed as usage events are recorded
- Tracked separately from monetary balance
- Ideal for prepaid usage packages
Grant Status
| Status | Description |
|---|---|
active | Credits available for use |
exhausted | All credits consumed |
expired | Credits expired unused |
voided | Grant manually voided |
Expiration Handling
Setting Expiration
Expiration dates are optional but recommended for financial planning.Expiration Notifications
Configure webhooks to notify customers before credits expire:- Go to Settings > Notifications
- Enable Credit Expiration Warning
- Set warning period (e.g., 30 days before)
Priority System
The priority value determines the order in which credits are consumed when multiple grants exist.- Grant C (priority 10, earliest expiration)
- Grant A (priority 10, later expiration)
- Grant B (priority 20)
Priority Best Practices
| Scenario | Recommended Priority |
|---|---|
| Promotional credits | 1-10 (consume first) |
| Purchased credits | 50-100 (preserve longer) |
| Loyalty rewards | 20-30 |
| Service credits | 5 (use immediately) |
Viewing Credit Balances
Dashboard
Navigate to Customers > [Customer] > Credits to see:- Total available balance
- Breakdown by grant
- Consumption history
- Upcoming expirations
API
Voiding a Grant
To void an unused or partially used grant:Dashboard
- Go to Customers > [Customer] > Credits
- Find the grant and click … menu
- Select Void Grant
- Confirm the action
API
Bulk Operations
Import Credits
Upload a CSV to create multiple grants:Export Credit Report
Generate a report of all credit grants and balances:- Go to Reports > Credits
- Set date range and filters
- Click Export CSV
Common Scenarios
Promotional Campaign
Award credits to all customers in a segment:Service Credit for Outage
Issue credits to affected customers:Prepaid API Package
Sell a block of API calls:Next Steps
Credit Consumption
Learn how credits are consumed.
Wallets
Set up prepaid wallets.