Skip to main content

Receipts

Every completed tool execution generates a receipt — your proof of work and payment.

What’s in a Receipt?

{
  "receipt_id": "rcpt_2026020112345",
  "step_id": "step_abc123",
  "run_id": "run_xyz789",
  "tool": "inference_chat",
  "quoted_usdc_microusd": 100000,
  "debited_usdc_microusd": 85000,
  "refunded_usdc_microusd": 15000,
  "created_at": "2026-02-01T12:00:00Z"
}

Receipt Fields

FieldDescription
receipt_idUnique receipt identifier
step_idExecution step this receipt covers
run_idParent run identifier
toolTool that was executed
quoted_usdc_microusdOriginal quote amount
debited_usdc_microusdActual amount charged
refunded_usdc_microusdAmount returned (if overpaid)
created_atWhen the receipt was issued

Getting Receipts

In Tool Response

Every tool call includes receipt metadata:
{
  "result": {
    "content": "...",
    "_meta": {
      "receipt_id": "rcpt_abc123",
      "debited_usdc_microusd": 85000
    }
  }
}

Query Receipt

Retrieve full receipt details:
curl -X POST https://agent.asgcompute.com/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "billing_get_receipt",
      "arguments": {
        "receipt_id": "rcpt_abc123"
      }
    }
  }'

Refunds

When you pay more than actual usage, the difference is automatically credited:
ScenarioQuotedActualRefund
Exact use$0.10$0.10$0.00
Overpay$0.10$0.08$0.02
Early cancel$1.00$0.30$0.70
Refunds are credited to your on-chain balance automatically. No action needed.

Receipt Retention

Receipts are stored for 90 days. Export receipts for accounting purposes before expiration.

Verification

All receipts are cryptographically signed and can be independently verified against on-chain records.