Settlement
Settlement automates the financial transactions between AI labs and data holders, with transparent, accurate, and automatic payment processing.
How settlement works
Xase's settlement system automatically processes payments between AI labs and data holders based on metered usage.
The settlement flow includes:
- — Usage calculation — Precise tracking of usage metrics
- — Pricing application — Rates applied to usage
- — Invoice generation — Automatic billing documents
- — Payment processing — Secure financial transactions
- — Revenue distribution — Payments to data holders
This creates a trustless financial relationship between all parties.
Settlement process
1. Usage Calculation
At the end of a billing cycle, usage is tallied:
{
"period_start": "2026-01-01T00:00:00Z",
"period_end": "2026-01-31T23:59:59Z",
"dataset_id": "dataset_medical_records_2025",
"usage_summary": {
"total_sessions": 14,
"total_hours": 247.5,
"total_records": 157842,
"total_gb": 32.7
}
}2. Pricing Calculation
Rates are applied to usage:
{
"pricing_tiers": {
"time_rate": [
{"tier": "0-100 hours", "rate": 10.00},
{"tier": "101-500 hours", "rate": 8.50},
{"tier": ">500 hours", "rate": 7.00}
],
"record_rate": 0.001,
"volume_rate": 5.00
},
"calculations": {
"time_cost": 2103.75,
"record_cost": 157.84,
"volume_cost": 163.50,
"subtotal": 2425.09
}
}3. Invoice Generation
Automatic invoice creation:
{
"invoice_id": "inv_a1b2c3d4",
"issued_date": "2026-02-01T00:00:00Z",
"due_date": "2026-02-15T00:00:00Z",
"status": "PENDING",
"customer": {
"id": "cust_123abc",
"name": "Medical AI Research",
"email": "billing@medical-ai.org"
},
"line_items": [
{"description": "Time-based usage (247.5 hours)", "amount": 2103.75},
{"description": "Record-based usage (157,842 records)", "amount": 157.84},
{"description": "Volume-based usage (32.7 GB)", "amount": 163.50}
],
"subtotal": 2425.09,
"tax": 218.26,
"total": 2643.35,
"currency": "USD"
}4. Payment Processing
Automatic payment collection:
{
"payment_id": "pay_b2c3d4e5",
"invoice_id": "inv_a1b2c3d4",
"date": "2026-02-03T14:27:32Z",
"status": "COMPLETED",
"amount": 2643.35,
"method": {
"type": "credit_card",
"last4": "1234",
"brand": "visa"
},
"receipt_url": "https://xase.ai/receipts/pay_b2c3d4e5"
}5. Revenue Distribution
Automatic payment to data holders:
{
"payout_id": "payout_c3d4e5f6",
"date": "2026-02-04T09:15:48Z",
"status": "COMPLETED",
"recipient": {
"id": "holder_456def",
"name": "Metropolitan Hospital",
"account": "acct_789ghi"
},
"breakdown": {
"total_payment": 2643.35,
"xase_fee": 396.50,
"data_holder_payment": 2246.85,
"currency": "USD"
},
"reference": "inv_a1b2c3d4"
}Managing settlement
For AI Labs (Payers)
Manage your billing and payments:
import xase
client = xase.Client(api_key="sk_...")
# Get invoices for a period
invoices = client.billing.list_invoices(
start_date="2026-01-01",
end_date="2026-01-31",
status="PENDING" # or "PAID", "OVERDUE"
)
for invoice in invoices:
print(f"Invoice {invoice.id}: ${invoice.total} due on {invoice.due_date}")
# Get invoice details
details = client.billing.get_invoice(invoice.id)
for item in details.line_items:
print(f"- {item.description}: ${item.amount}")
# Pay an invoice
payment = client.billing.pay_invoice(
invoice_id=invoice.id,
payment_method_id="pm_visa_1234"
)
print(f"Payment status: {payment.status}")
print(f"Receipt: {payment.receipt_url}")For Data Holders (Payees)
Manage your revenue and payouts:
# For data holders
import xase
client = xase.Client(api_key="sk_...")
# Get revenue overview
revenue = client.billing.get_revenue_summary(
start_date="2026-01-01",
end_date="2026-01-31"
)
print(f"Total revenue: ${revenue.total}")
print(f"Platform fees: ${revenue.platform_fees}")
print(f"Net revenue: ${revenue.net}")
# Get payouts
payouts = client.billing.list_payouts(
start_date="2026-01-01",
end_date="2026-01-31"
)
for payout in payouts:
print(f"Payout {payout.id}: ${payout.amount} on {payout.date}")
# Set payout preferences
client.billing.update_payout_preferences(
frequency="MONTHLY", # or "WEEKLY", "DAILY"
threshold=100.00, # minimum amount to trigger payout
method={
"type": "bank_account",
"account_id": "ba_123def"
}
)Usage Alerts and Limits
Set spending controls and alerts:
# Set spending limits
import xase
client = xase.Client(api_key="sk_...")
client.billing.set_spending_limit(
dataset_id="dataset_medical_records_2025",
limit_amount=5000.00,
period="MONTHLY"
)
# Configure alerts
client.billing.create_billing_alert(
name="High usage alert",
threshold_amount=1000.00,
threshold_type="MONTHLY_SPENDING",
notification_email="finance@company.com"
)
# Set auto-suspension
client.billing.set_auto_suspension(
threshold_amount=10000.00,
notification_email="finance@company.com",
allow_override=True,
override_approvers=["cfo@company.com"]
)Payment methods & security
Payment Methods
Multiple secure payment options including credit cards, ACH transfers, wire transfers, and enterprise billing.
Escrow Services
Optional escrow for high-value transactions, releasing payment only when usage is verified.
Security Standards
PCI DSS Level 1 compliant payment processing with full encryption of financial data.
Transaction Records
All financial transactions are recorded with the same evidence standards as data access.
