What Developers Care About
API Basics
Authentication
All API requests require a Bearer token:Base URLs
Limits
A rate-limited request returns
429. The SDK raises it as a RateLimitError carrying retryAfter.
Key Integration Points
1. Customer Sync
Keep Alguna customers in sync with your user database:
Endpoint:
POST /customers
2. Usage Metering
Send usage events to bill customers accurately:
Endpoint:
POST /events
3. Subscription Management
4. Entitlements Check
Check if a customer can access a feature:Webhooks
Alguna sends webhooks to notify your systems of billing events.Setup
- Navigate to Settings → Webhooks
- Add your endpoint URL
- Select events to receive
- Copy the signing secret
Webhook Events
Verifying Signatures
Webhooks are signed using Standard Webhooks and delivered through Svix. Verify with the Svix library for your language rather than hand-rolling the check:svix-id, svix-timestamp and svix-signature headers.
Retry Policy
Failed deliveries are retried on a backoff, then the endpoint is disabled. See Webhooks for the schedule.Usage Metering
Sending Events
Send usage events as they occur: Endpoint:POST /events
Events are sent as a batch:
{"events": [ ... ]}, up to 100 per request.
Best Practices
Deduplication
Setunique_id on every event. A resend carrying the same unique_id is not counted again:
Sandbox Testing
Getting Started
- Log in to sandbox.alguna.io
- Get sandbox API keys at Settings → API Keys
- Use sandbox base URL:
https://api.sandbox.alguna.io
Test Scenarios
Common Patterns
Provisioning on Subscription
Usage-Based Billing
Credit System
Key Resources
Billable Metrics
Define what usage to track.
Send Usage
Ingesting usage events.
Credits & Wallets
Pre-paid credit systems.
Subscriptions
Managing subscription lifecycle.
API Reference
API Overview
Authentication, rate limits, errors.
Ingest Events
Send usage events.
Webhooks
Event payloads and setup.
Customers API
Create and manage customers.
Related Quick Starts
AI & Infrastructure
Token-based and usage billing.
Self-Serve (PLG)
Checkout and upgrade flows.
Fintech & Payments
Transaction-based metering.
← Back to Quick Starts
See all quick start guides