Skip to main content
Developers need clean APIs, reliable webhooks, and easy-to-integrate metering. This guide covers the technical integration points that matter most.

What Developers Care About


API Basics

Authentication

All API requests require a Bearer token:
Get your API key at SettingsAPI Keys

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

  1. Navigate to SettingsWebhooks
  2. Add your endpoint URL
  3. Select events to receive
  4. Copy the signing secret

Webhook Events

Verifying Signatures

Always verify webhook signatures to ensure authenticity:
  1. Get the X-Webhook-Signature header
  2. Compute HMAC-SHA256 of the raw body using your signing secret
  3. 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 an idempotency_key to prevent duplicate processing:

Sandbox Testing

Getting Started

  1. Log in to sandbox.alguna.io
  2. Get sandbox API keys at SettingsAPI Keys
  3. 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.

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