Docs / Payments
Payments

Citadel Mint

The USDC-native payment system powering all economic flows in Opacus — task budgets, API credits, cross-chain transfers, and fiat on-ramp.

Overview

Citadel Mint is an internal USDC ledger maintained by Agent Kernel. Every user has a scoped balance tracked in the kernel's key-value store. On-chain USDC transfers (deposits/withdrawals) go through the execution wallet on Base.

Deposit flow

  1. User transfers USDC to the execution wallet address on Base
  2. User records the deposit in Agentboard: enters amount + on-chain tx hash
  3. Agent Kernel credits the internal balance for that user scope
📝
There is currently no automatic deposit detection. The user must manually record the tx hash after sending USDC on-chain.

Withdraw flow

  1. User enters withdrawal amount and destination wallet in Agentboard → Balance tab
  2. Agent Kernel verifies the destination address is valid and balance is sufficient
  3. Kernel initiates an on-chain USDC transfer from the execution wallet to the destination

Fiat on-ramp

Agentboard provides a card payment link (Visa/Mastercard) that routes USDC directly to the execution wallet on Base. No additional steps required — funds appear as spendable once the on-chain transaction confirms.

API credits (MCP tools)

From Claude or Cursor, use these tools to top up AI provider credits:

# Top up OpenAI credits
"Add 0.5 USDC to my OpenAI balance via Opacus"
// Calls: pay_openai_api({ amountUsdc: 0.5, reference: "optional-ref" })

# Top up any provider
"Pay 0.3 USDC to Anthropic API via Opacus"
// Calls: pay_api_with_opacuspay({ provider: "anthropic", amountUsdc: 0.3 })

# General transfer
"Pay 1.2 USDC to merchant wallet 0x1234 via Opacus"
// Calls: pay_with_opacuspay({ to: "0x1234...", amountUsdc: 1.2 })

All API credit payments appear in the API Credits panel on the Agentboard Balance tab.

REST API

MethodEndpointDescription
POST/api/store/paymentsRecord an API credit payment. Body: { wallet, payment }
GET/api/paymentsList payment history for authenticated user. Query: ?limit=50
GET/api/kinetic/balanceGet current USDC balance for user scope
POST/api/kinetic/depositRecord a USDC deposit with tx hash
POST/api/kinetic/withdrawInitiate a USDC withdrawal to user wallet

Payment record schema

{
  "id":          "pay_abc123",         // unique payment ID
  "provider":    "openai",             // openai | anthropic | other
  "amount":      0.5,                  // USDC amount
  "amountUsdc":  0.5,                  // alias
  "reference":   "inv-42",             // optional reference string
  "status":      "charged",            // charged | pending | failed
  "timestamp":   1711234567890         // Unix ms
}

Viewing payment history

In Agentboard: Balance tab → API Credits section → click Refresh

Via MCP: ask Claude "Show my last 20 Opacus payments" (calls list_opacuspay_history)

Via API:

curl -H "Authorization: Bearer YOUR_API_KEY" \
     -H "x-opacus-user-email: you@example.com" \
     http://localhost:3006/api/payments?limit=50

Platform fees & gasless execution

All platform fees are deducted off-chain from the Kinetic Ledger. No on-chain transaction is needed for the fee itself, which means users never need native tokens (ETH, SOL, A0GI) — only USDC.

OperationFeeCharged via
Agent creation0.05 USDCKinetic Ledger debit
Per prompt / task0.01 USDCKinetic Ledger debit
Bridge / swap / transfer1% of amountKinetic Ledger debit
Native gas (ETH / SOL / A0GI)FreeCitadel Facilitator

The Citadel Facilitator maintains dedicated gas wallets on Base, 0G, and Solana. When an execution wallet is low on gas, the facilitator tops it up automatically before any transaction.

See the Gasless Execution & Facilitator page for full architecture, env vars, and funding instructions.
Previous
← Agentboard UI