What Developers Care About
API Basics
Authentication
All API requests require a Bearer token:Base URLs
Rate Limits
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
Always verify webhook signatures to ensure authenticity:- Get the
X-Webhook-Signatureheader - Compute HMAC-SHA256 of the raw body using your signing secret
- Compare signatures (use constant-time comparison)
Retry Policy
Usage Metering
Sending Events
Send usage events as they occur: Endpoint:POST /events
Best Practices
Deduplication
Include anidempotency_key to prevent duplicate processing:
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