Skip to main content

Get Balance

GET /v1/wallet/balance
Returns your current ACN balance and lifetime transaction summary.
Authentication required.

Example

curl https://api.acn.exchange/v1/wallet/balance \
  -H "Authorization: Bearer acn_sk_your_api_key"

Response

{
  "balance_usdc": "10.50",
  "pending_settlements_usdc": "0.00",
  "total_deposited_usdc": "25.00",
  "total_spent_usdc": "14.50"
}
FieldTypeDescription
balance_usdcstringCurrent available balance
pending_settlements_usdcstringAmount pending in settlement
total_deposited_usdcstringLifetime deposits
total_spent_usdcstringLifetime spend on calls

Deposit Funds

POST /v1/wallet/deposit
Submit a deposit transaction hash for verification. After sending USDC to the ACN platform wallet on Base, call this endpoint so ACN can verify the transaction and credit your balance.

Request Body

FieldTypeRequiredDescription
tx_hashstringYesThe on-chain transaction hash of your USDC transfer

Example

curl -X POST https://api.acn.exchange/v1/wallet/deposit \
  -H "Authorization: Bearer acn_sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "tx_hash": "0xabc123..."
  }'

Response

{
  "deposit_id": "dep_abc123",
  "amount_usdc": "10.00",
  "status": "confirmed",
  "new_balance_usdc": "20.50"
}

Deposit Flow

  1. Send USDC on Base to the ACN platform wallet address
  2. Wait for the transaction to be confirmed on-chain
  3. Call POST /v1/wallet/deposit with the transaction hash
  4. ACN verifies the transfer event and credits your balance
Minimum deposit: $5 USDC. The platform wallet address is available in your dashboard.

Transaction History

GET /v1/wallet/history
Returns your recent transactions (calls, deposits, refunds).

Query Parameters

ParameterTypeDefaultDescription
limitnumber20Number of transactions to return (max 100)
cursorstringPagination cursor
typestringFilter by type: call, deposit, refund, settlement

Example

curl "https://api.acn.exchange/v1/wallet/history?limit=5&type=call" \
  -H "Authorization: Bearer acn_sk_your_api_key"

Response

{
  "data": [
    {
      "id": "txn_abc123",
      "type": "call",
      "amount_usdc": "-0.002",
      "call_id": "call_7f8a9b2c",
      "provider_id": "resend",
      "endpoint": "send-email",
      "timestamp": "2026-03-08T12:00:00Z"
    },
    {
      "id": "txn_def456",
      "type": "deposit",
      "amount_usdc": "+10.00",
      "tx_hash": "0xabc123...",
      "timestamp": "2026-03-08T11:00:00Z"
    }
  ],
  "pagination": {
    "has_more": true,
    "next_cursor": "cursor_xyz"
  }
}

Error Codes

CodeDescription
ACN-PAY-001Insufficient balance (for execution, not deposit)
ACN-PAY-002Invalid transaction hash — not found on-chain
ACN-PAY-003Transaction already processed — duplicate deposit
ACN-PAY-004Below minimum deposit amount ($5 USDC)
ACN-PAY-005Transaction recipient is not the ACN platform wallet
ACN-AUTH-001Missing or invalid authentication