Billing & Credits
Crane Ledger uses a transparent, credit-based pricing model designed for developers. All API operations consume credits from your organization's unified pool, with no hidden fees or surprise charges. This guide explains how billing works and how to manage your costs effectively.
π― Credit System Overview
Basic Unit
1 Credit = $0.01 USD
Every API operation consumes credits from your organization's credit pool:
- Transparent pricing - Every endpoint shows its credit cost
- Predictable costs - Know exactly what each operation costs
- No overages - Operations are blocked when credits run out
- Real-time tracking - Monitor usage as you go
Organization-Based Billing
Credits are tied to organizations, not users:
{
"organization_id": "ORG_1234567890abcdef",
"credits_remaining": 1500,
"credits_total": 2000,
"auto_recharge_enabled": true,
"billing_email": "billing@company.com"
}
Key Benefits:
- Multi-user organizations share credit pools
- Client isolation in accounting firms (separate billing per client)
- Cost allocation for enterprise deployments
- Flexible billing across different business units
π° Pricing Tiers
Choose the credit package that fits your development needs:
Solo Dev Package
$10.00 - 1,000 Credits
Perfect for individual developers and small projects:
- Cost: $10.00 one-time purchase
- Credits: 1,000 (enough for ~3-6 months of light usage)
- Monthly equivalent: ~$3.35/month
- Use case: Personal projects, prototypes, learning
Builder Package
$50.00 - 5,000 Credits
Ideal for development teams and growing applications:
- Cost: $50.00 one-time purchase
- Credits: 5,000 (sustained development usage)
- Monthly equivalent: ~$16.70/month
- Use case: Development teams, MVPs, production applications
Scale Package
$250.00 - 25,000 Credits
Built for high-volume applications and enterprises:
- Cost: $250.00 one-time purchase
- Credits: 25,000 (heavy usage applications)
- Monthly equivalent: ~$83.40/month
- Use case: Enterprise platforms, high-traffic applications
Enterprise Custom Packages
Need more credits or special terms?
- Volume discounts for large purchases
- Custom credit amounts (50K, 100K, 500K+)
- Enterprise agreements with dedicated support
- Contact sales for custom pricing
π Operation Pricing
Free Operations (0 Credits)
These operations don't consume credits:
- All read operations (GET requests, listings, searches)
- Data retrieval (account balances, transaction history, reports)
- System information (health checks, API status)
- Authentication (login, token refresh)
Paid Operations
Core Accounting Operations
| Operation | Credits | Cost | Description |
|---|---|---|---|
| Transaction Create | 2 | $0.02 | Manual transaction entry |
| Transaction Update | 1 | $0.01 | Modify existing transaction |
| Transaction Post | 1 | $0.01 | Post pending transaction |
| Account Create/Update | 1 | $0.01 | Chart of accounts management |
Document Management
| Operation | Credits | Cost | Description |
|---|---|---|---|
| Invoice Create | 1 | $0.01 | Generate sales invoice |
| Invoice Update | 1 | $0.01 | Modify draft invoice |
| Invoice Send | 1 | $0.01 | Mark as sent to customer |
| Invoice Payment Record | 1 | $0.01 | Record payment received |
| Bill Create | 1 | $0.01 | Process purchase bill |
| Bill Update | 1 | $0.01 | Modify draft bill |
| Bill Payment Record | 1 | $0.01 | Record payment made |
| Document Upload | 5 | $0.05 | Upload file attachment (PDF, image, CSV, etc.) |
Business Management
| Operation | Credits | Cost | Description |
|---|---|---|---|
| Contact Create/Update | 1 | $0.01 | Customer/vendor management |
| Item Create/Update | 1 | $0.01 | Product/service catalog |
| Category Create/Update | 1 | $0.01 | Organization categories |
Advanced Features
| Operation | Credits | Cost | Description |
|---|---|---|---|
| Report Generation | 5 | $0.05 | Trial balance, income statement |
| API Key Create | 1 | $0.01 | Generate new API key |
| Recurring Setup | 10 | $0.10 | Configure recurring transactions |
π Auto-Recharge System
How It Works
Prevent service interruptions with automatic credit replenishment:
- Low Balance Alert: When credits drop below $4.00 (400 credits)
- Automatic Recharge: Adds credits to reach $20.00 balance (2,000 credits)
- Email Notification: Sent when auto-recharge occurs
- Continued Service: No interruption to your applications
Trigger Conditions
// Auto-recharge triggers when:
credits_remaining <= 400 // $4.00
// Adds credits to reach:
target_balance = 2000 // $20.00
Managing Auto-Recharge
Enable/Disable per Organization:
# Check current setting
GET /organizations/{org_id}/billing
# Enable auto-recharge
PUT /organizations/{org_id}/billing
{
"auto_recharge_enabled": true
}
# Disable auto-recharge
PUT /organizations/{org_id}/billing
{
"auto_recharge_enabled": false
}
Benefits:
- Never run out of credits unexpectedly
- Predictable billing cycles
- Per-organization control - different settings for different orgs
- Email alerts - stay informed of usage
π’ Organization Base Cost
$1.00 Per Organization Per Month
Every active organization incurs a base maintenance cost:
- $1.00/month ($12/year) per organization
- 25 credits/week (prorated daily)
- Automatic deduction from credit balance
- Ensures service availability and system maintenance
What It Covers
The base cost supports:
- System maintenance and infrastructure
- Database storage and backups
- API availability and performance monitoring
- Security updates and compliance
- Customer support infrastructure
Free Organizations
New organizations receive 500 credits ($5.00) upon creation, covering:
- ~2 weeks of base costs
- Initial setup and testing
- Getting started without immediate payment
π³ Payment Methods
Credits are priced at $0.01 per credit (1 credit = one cent). You can top up in three ways: human checkout in the Crane web app, Stripe Checkout via the REST API (or GraphQL), or USDC on Base via x402 for programmatic or agent-driven flows.
Three ways to add credits
| Path | Who pays | How |
|---|---|---|
| Web app (Dashboard) | Human with card or Stripe Link | Signed-in user opens Billing & Usage, enters a credit amount, and completes Stripe Checkout. The app calls POST /api/stripe/checkout with JSON { "credits": <number>, "returnPath": "/dashboard/billing" } and redirects to the returned url. Minimum purchase in the app is 100 credits. |
| REST or GraphQL + Stripe | Human (open checkout_url) or your server returning that URL to a browser | POST /organizations/{master_organization_id}/credits/purchase with Authorization: Bearer <api_key> and a JSON body (see below). Response includes checkout_url. The billing organization must have a Stripe customer configured. GraphQL: same outcome via the purchaseCredits mutationβsee GraphQL credit management. |
| x402 (Base USDC) | Wallet that signs EIP-3009 (human or agent-held key) | POST /organizations/{master_organization_id}/credits/purchase-x402?credits=<n> with your API key; complete the HTTP 402 challenge, then retry with PAYMENT-SIGNATURE. Use the billing master org id in the URL even for sub-orgβscoped keys. Full protocol, env vars, and MCP tools: x402 credit top-up. Accepted asset: official USDC on Base at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (network eip155:8453). |
Stripe Checkout via REST API
POST /organizations/ORG_master/credits/purchase
Authorization: Bearer ha_live_...
Content-Type: application/json
{
"organization_id": "ORG_master",
"credit_amount": 5000,
"success_url": "https://yourapp.com/billing/success",
"cancel_url": "https://yourapp.com/billing/cancel"
}
Example response fields: checkout_url, credits_to_add, price_cents, expires_at. Send the user to checkout_url; when Stripe confirms payment, webhooks add credits to the organization.
Supported payment methods (Stripe Checkout)
What end users typically see at Stripe-hosted checkout:
- Credit cards (Visa, Mastercard, American Express)
- Debit cards (major networks)
- Digital wallets (Apple Pay, Google Pay, where enabled)
- Stripe Link and other methods your Stripe Dashboard allows
Billing Information
// Update billing details
PUT /organizations/{org_id}/billing
{
"billing_email": "billing@company.com",
"billing_address": {
"line1": "123 Business St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
}
}
π Usage Monitoring
Check Credit Balance
# Get current credit status
GET /organizations/{org_id}/billing
# Response
{
"organization_id": "ORG_1234567890abcdef",
"credits_remaining": 1500,
"credits_total": 2000,
"auto_recharge_enabled": true,
"billing_email": "billing@company.com",
"stripe_customer_id": "cus_xxxxxxxxxxxxxxxx",
"last_recharge_at": "2024-01-15T10:30:00Z",
"next_billing_date": "2024-02-01T00:00:00Z"
}
Usage History
# Get credit consumption events
GET /organizations/{org_id}/events?type=credits_consumed&limit=50
# Response includes detailed usage
[
{
"event_type": "credits_consumed",
"entity_type": "transaction",
"entity_id": "TXN_1234567890abcdef",
"credits_used": 2,
"description": "Transaction created",
"timestamp": "2024-01-20T14:22:00Z"
}
]
Real-Time Alerts
Email notifications for:
- Low balance warnings (below $4.00)
- Auto-recharge events (when triggered)
- Payment failures (card declined)
- Billing updates (new payment method)
ποΈ Multi-Organization Billing
Master Organization Billing
Credits are managed at the master organization level:
Master Organization (Billing Root)
βββ Credits Pool: 10,000
βββ Sub-Org A (Shared Billing): Consumes from master pool
βββ Sub-Org B (Shared Billing): Consumes from master pool
βββ Sub-Org C (Shared Billing): Consumes from master pool
Billing Hierarchy Rules
- Master organizations hold the credit pools
- All sub-organizations share billing with the master organization
- Credit consumption is tracked per organization for internal allocation
- Auto-recharge configured at master level
Cost Allocation Strategies
For Accounting Firms:
// All clients share master billing, tracked per-org
Client A Organization: Shared billing (usage tracked)
Client B Organization: Shared billing (usage tracked)
Firm Admin Organization: Shared billing (overhead costs)
For Enterprises:
// Department cost centers
Sales Division: Shared billing (marketing costs)
Engineering Division: Shared billing (tool costs)
Corporate Overhead: Master billing (shared services)
π‘ Billing Examples
Individual Developer (Monthly Usage)
Starting Credits: 500 (free)
Base Cost: $1.00 (25 credits/week)
Usage:
βββ 50 Manual Transactions: 100 credits ($1.00)
βββ 10 Invoices: 10 credits ($0.10)
βββ 5 Reports: 25 credits ($0.25)
βββ API Integration: 50 credits ($0.50)
Total Cost: $2.85/month
Effective Rate: ~$0.057 per transaction
Development Team (Monthly Usage)
Starting Credits: 500 (free)
Base Cost: $1.00 (25 credits/week)
Usage:
βββ 200 Manual Transactions: 400 credits ($4.00)
βββ 50 Invoices: 50 credits ($0.50)
βββ 20 Reports: 100 credits ($1.00)
βββ Recurring Jobs: 100 credits ($1.00)
βββ API Integration: 200 credits ($2.00)
Total Cost: $9.50/month
Effective Rate: ~$0.032 per transaction
Enterprise Platform (Monthly Usage)
Starting Credits: 500 (free)
Base Cost: $1.00 (25 credits/week)
Usage:
βββ 1,000 Manual Transactions: 2,000 credits ($20.00)
βββ 200 Invoices: 200 credits ($2.00)
βββ 100 Reports: 500 credits ($5.00)
βββ Bank Reconciliation: 200 credits ($2.00)
βββ Multi-Currency: 300 credits ($3.00)
βββ API Integration: 500 credits ($5.00)
Total Cost: $38.00/month
Effective Rate: ~$0.030 per transaction
β οΈ Credit Limits & Service Protection
Low Balance Warnings
- Email alerts when balance drops below $4.00
- API warnings in response headers
- Dashboard indicators in web interface
- Grace period before service suspension
Service Suspension
When credits reach zero:
- Read operations remain free (check balances, get data)
- Write operations are blocked (create, update, delete)
- Immediate resumption after adding credits
- No data loss - all data preserved
Preventing Service Interruptions
- Enable auto-recharge for production applications
- Monitor usage through API or dashboard
- Set up alerts for low balance warnings
- Maintain buffer credits for unexpected usage spikes
π οΈ Managing Billing Programmatically
Purchase credits via REST API
async function purchaseCredits(masterOrgId, apiKey, creditAmount) {
const response = await fetch(
`https://api.craneledger.ai/organizations/${masterOrgId}/credits/purchase`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${apiKey}`,
},
body: JSON.stringify({
organization_id: masterOrgId,
credit_amount: creditAmount,
success_url: `${window.location.origin}/billing/success`,
cancel_url: `${window.location.origin}/billing/cancel`,
}),
}
);
const { checkout_url } = await response.json();
window.location.href = checkout_url;
}
Check Usage Programmatically
// Monitor credit balance
async function checkCredits(orgId) {
const response = await fetch(`/organizations/${orgId}/billing`);
const billing = await response.json();
if (billing.credits_remaining < 400) {
alert('Low credit balance! Consider purchasing more credits.');
}
return billing;
}
// Get usage history
async function getUsageHistory(orgId, days = 30) {
const since = new Date();
since.setDate(since.getDate() - days);
const response = await fetch(
`/organizations/${orgId}/events?type=credits_consumed&since=${since.toISOString()}`
);
return await response.json();
}
Auto-Recharge Management
// Enable auto-recharge
async function enableAutoRecharge(orgId) {
const response = await fetch(`/organizations/${orgId}/billing`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
auto_recharge_enabled: true
})
});
return await response.json();
}
π― Best Practices
For Individual Developers
- Start with Solo Dev package for personal projects
- Enable auto-recharge to avoid service interruptions
- Monitor usage through the dashboard
- Upgrade packages as your usage grows
For Development Teams
- Use Builder package for team development
- Create separate organizations for different projects
- Enable auto-recharge for production environments
- Use API integration for automated credit monitoring
For Enterprise Platforms
- Choose Scale package for high-volume applications
- Create master organizations per client for billing isolation
- Use API integration for automated credit management
- Contact sales for custom enterprise packages
Cost Optimization
- Batch operations when possible (reduce API calls)
- Use read operations freely (they're free)
- Cache data to reduce repeated API calls
- Monitor usage patterns to identify optimization opportunities
π Billing Troubleshooting
"My API calls are being rejected"
- Check credit balance:
GET /organizations/{org_id}/billing - Purchase more credits if balance is zero
- Enable auto-recharge to prevent future issues
"I wasn't charged for auto-recharge"
- Auto-recharge only triggers when balance drops below $4.00
- Check if auto-recharge is enabled for the organization
- Verify payment method is valid
"Credits are disappearing faster than expected"
- Review usage history:
GET /organizations/{org_id}/events - Check for unexpected API calls or integrations
- Consider upgrading to a larger package
Need help?
Create a free account to access our support portal. Once signed in, use the Support tab in your dashboard to submit a support ticket β our team typically responds within 24 hours.
- β¨ For LLMs/AI assistants: Read our structured API reference