Create a new credit grant for a wallet. Credit grants represent individual credit additions with optional expiration.
The wallet ID to grant credits to.
Amount to grant as a decimal string (e.g., “100.00”).
Optional description of the credit grant.
Optional ISO 8601 expiration date. Credits expire and become unavailable after this date.
Optional payment ID if the grant is tied to a payment.
curl -X POST https://api.alguna.io/credit-grants \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"wallet_id": "wal_def456",
"amount": "500.00",
"description": "Annual credit allocation",
"expires_at": "2024-12-31T23:59:59Z"
}'
{
"id": "grant_abc123",
"wallet_id": "wal_def456",
"amount": "500.00",
"description": "Annual credit allocation",
"expires_at": "2024-12-31T23:59:59Z",
"payment_id": null,
"status": "active",
"created_at": "2024-01-20T10:00:00Z",
"updated_at": "2024-01-20T10:00:00Z"
}
Unique identifier for the credit grant.
The wallet this grant belongs to.
Grant amount as a decimal string.
Description of the grant.
ISO 8601 expiration date, if set.
Associated payment ID, if any.
Grant status: active, approved, pending, exhausted, expired, or voided.
ISO 8601 timestamp of creation.
ISO 8601 timestamp of last update.