Skip to main content
POST
/
v1
/
cards
/
:id
/
log-transaction
curl -X POST https://api.usenaive.ai/v1/cards/card-uuid-1/log-transaction \
  -H "Authorization: Bearer nv_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount_cents": 1500,
    "merchant_name": "OpenAI",
    "description": "GPT-4 API usage",
    "agent_id": "agent-uuid-1",
    "metadata": {
      "invoice_id": "inv_123"
    }
  }'
{
  "transaction": {
    "id": "txn-uuid-1",
    "card_id": "card-uuid-1",
    "amount_cents": 1500,
    "merchant_name": "OpenAI",
    "description": "GPT-4 API usage",
    "agent_id": "agent-uuid-1",
    "metadata": {
      "invoice_id": "inv_123"
    },
    "created_at": "2026-03-15T14:30:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://usenaive.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Logs a transaction against a card. Useful for tracking spend that occurs outside of automatic Stripe webhook processing.

Request Body

ParameterTypeRequiredDescription
amount_centsnumberYesTransaction amount in cents
merchant_namestringNoName of the merchant
descriptionstringNoDescription of the transaction
agent_idstringNoAgent UUID that initiated the transaction
metadataobjectNoArbitrary key-value metadata
curl -X POST https://api.usenaive.ai/v1/cards/card-uuid-1/log-transaction \
  -H "Authorization: Bearer nv_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount_cents": 1500,
    "merchant_name": "OpenAI",
    "description": "GPT-4 API usage",
    "agent_id": "agent-uuid-1",
    "metadata": {
      "invoice_id": "inv_123"
    }
  }'
{
  "transaction": {
    "id": "txn-uuid-1",
    "card_id": "card-uuid-1",
    "amount_cents": 1500,
    "merchant_name": "OpenAI",
    "description": "GPT-4 API usage",
    "agent_id": "agent-uuid-1",
    "metadata": {
      "invoice_id": "inv_123"
    },
    "created_at": "2026-03-15T14:30:00Z"
  }
}

CLI

naive cards log-transaction <id> --amount 1500
With optional fields:
naive cards log-transaction <id> --amount 1500 --merchant "OpenAI" --description "GPT-4 API usage"

MCP

Tool: naive_cards_log_transaction
{
  "card_id": "card-uuid-1",
  "amount_cents": 1500,
  "merchant_name": "OpenAI",
  "description": "GPT-4 API usage",
  "agent_id": "agent-uuid-1"
}