Skip to main content

Drip Documentation

Drip is metered billing infrastructure for high-frequency, sub-cent charges. Track usage off-chain, settle on-chain.

Quickstart

Go from zero to tracking usage in 5 minutes. No blockchain setup needed.

AI Agents

Track agent executions with per-step cost attribution and traces.

API Companies

Per-request usage tracking with customer attribution.

RPC Providers

Per-method, per-chain usage with latency and cache analytics.

How it works

1

Track usage

Record usage events via the SDK or REST API. Each event is tied to a customer and a meter (e.g., api_calls, tokens).
2

Accumulate charges

When a pricing plan matches the meter, Drip creates a charge automatically. Charges accumulate off-chain until they hit a settlement threshold.
3

Settle on-chain

Batch settlement on Base — a single on-chain transaction covers many charges. Gas-efficient, verifiable, no chargebacks.

Install

npm install @drip-sdk/node
import { drip } from '@drip-sdk/node';

const customer = await drip.createCustomer({ externalCustomerId: 'user_123' });
await drip.trackUsage({ customerId: customer.id, meter: 'api_calls', quantity: 1 });

Key concepts

Entitlements

Gate features with pre-request quota checks.

Webhooks

Get notified on charges, settlements, and balance changes.

Error Codes

Complete reference for API errors and handling.