Developer Help & Trust Center
Operational playbooks, reconciliation guides, and policy docs
Getting Started
Wallets & Smart Accounts
Understand your wallet address, smart account, and how they work together.
Trust
Audits, invariants, and SLAs
Audit posture, enforced safety properties, pause/drain plan, ownership controls, and support targets.
Pricing
Fees & gas sponsorship
Platform fee structure, minimums, batching coverage, and our Base gas sponsorship policy.
Legal
Policies & Compliance
Privacy practices, data handling, and regulatory compliance information.
Charge event basics
The BillingModule emits a Charge event every time a customer is billed. Each event includes:
- account: the customer smart account.
- merchant: your receiving address.
- amount: USDC amount in token units.
- usageId: the unique 32-byte identifier Drip derives per usage event.
- timestamp: emitted block timestamp.
Event topic (for log filters): 0x47c57412f9a6e6a175c6c8b61cf7256cab2f39c16b0f229b7d6862a5eecefe33
Query on Base with Basescan
- Open basescan.org and navigate to your BillingModule contract.
- Go to the "Events" tab and filter by the Charge event.
- Use the "Filter by Topic" box with topic0 set to 0x47c57412f9a6e6a175c6c8b61cf7256cab2f39c16b0f229b7d6862a5eecefe33 to only see Charge logs.
- Download the CSV from Basescan to get txHash, blockNumber, and the usageId field.
Tip: you can also copy the JSON-RPC log filter and run it from your scripts if you prefer code.
Query programmatically
You can pull Charge events directly from a Base RPC using your favorite library. Below is an example with viem:
import { createPublicClient, http } from 'viem';
import { base } from 'viem/chains';
// Get contract addresses from the Drip API: GET /v1/wallet/config
const billingContract = '0x...'; // Your billing contract address
const client = createPublicClient({
chain: base,
transport: http('YOUR_RPC_URL')
});
const logs = await client.getLogs({
address: billingContract as `0x${string}`,
fromBlock: 0n,
event: {
type: 'event',
name: 'Charge',
inputs: [
{ name: 'account', type: 'address', indexed: true },
{ name: 'merchant', type: 'address', indexed: true },
{ name: 'amount', type: 'uint256', indexed: false },
{ name: 'usageId', type: 'bytes32', indexed: true },
{ name: 'timestamp', type: 'uint256', indexed: false },
],
},
});
console.log(logs[0].transactionHash, logs[0].args.usageId);Reconcile with dashboard exports
The dashboard export (/v1/charges/export?format=csv) includes usageId, txHash, and blockNumber. To reconcile:
- Export charges from the dashboard or call the API endpoint for CSV/JSON.
- Fetch on-chain Charge events (Basescan CSV or RPC logs) and sort by
usageId. - Match rows on
usageId; txHash and blockNumber should align between the on-chain log and the export. - Investigate any missing usageIds to spot pending/failed charges.
If you are using batching, multiple usageIds can share the same txHash. Block numbers still map to the block where the batch was settled.