Skip to content
1Claw Academy
Curriculum/Transactions & Treasury3 minAdvanced · Lesson 11 of 16

Payment cards over x402

Have an agent order a prepaid card, paid with an on-chain x402 payment, without ever seeing the card number.

An agent can order prepaid and gift cards through 1Claw and never see the PAN or CVV. The purchase is paid with an outbound x402 payment that the Vault constructs and signs using the agent's own Ethereum signing key, which must hold USDC on Base.

Concept

PCI posture matters here. For Laso cards only the card_id and an encrypted refresh token are stored; the PAN and CVV are fetched just-in-time at reveal and never persisted.

  • cards_enabled: the master switch.
  • card_max_order_usd and card_daily_limit_usd: enforced atomically over a rolling 24-hour window.
  • card_payto_allowlist: which x402 recipients are acceptable.
  • card_require_approval: defaults to true, so orders wait for a human.
  1. 1

    Set the ordering guardrails on the agent. These bound the purchase, not how the card is later spent.

    bash
    curl -s -X PATCH https://api.1claw.co/v1/agents/$AGENT_ID \
      -H "Authorization: Bearer $ONECLAW_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "cards_enabled": true,
        "card_max_order_usd": 25,
        "card_daily_limit_usd": 25,
        "card_require_approval": true
      }'
  2. 2

    As the agent, order a card. Idempotency-Key is required.

    bash
    curl -s -X POST https://api.1claw.co/v1/agents/$AGENT_ID/cards/order \
      -H "Authorization: Bearer $AGENT_TOKEN" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{ "kind": "prepaid", "amount_usd": 25, "country": "US" }'
  3. 3

    Because approval is required you get a 202 with status awaiting_approval, and no payment has been made yet.

    json
    { "status": "awaiting_approval", "card_id": "...", "approval_id": "..." }
  4. 4

    A human approves: in the dashboard, the mobile app, or by one-click email link. Only then does the x402 payment run.

    bash
    curl -s -X POST https://api.1claw.co/v1/approvals/$APPROVAL_ID/decide \
      -H "Authorization: Bearer $ONECLAW_TOKEN" \
      -d '{"decision":"approved"}'
  5. 5

    Check status. The card monitor polls the provider and fills in last4, expiry, and balance.

    bash
    1claw card list
    1claw card get <card-id>   # always masked to last4
Tip

Before signing the EIP-3009 authorization the Vault validates the 402 challenge: payTo must be allowlisted, the network must be Base (eip155:8453), the amount must match, and the asset must equal the pinned Base USDC contract. That validation is the security boundary.

Watch out

Revealing a card is human-only by default. Agents get a 403 unless a human enabled a per-card reveal_policy. Reveal is deliberately absent from the MCP tool set, so a PAN can never land in a model's context window.

Where this goes wrong in practice. Card ordering combines an agent, a payment rail and a bearer instrument, and each seam has its own failure.

  • Order caps are mistaken for spend caps. The guardrails bound what an agent may buy, not what the resulting card can be spent on. Once funded, the balance is outside their reach.
  • Idempotency keys are reused or omitted. The key is required on order, and getting it wrong means either a rejected request or a duplicate purchase depending on which direction you err.
  • Orphaned payments are ignored. The monitor flags rows stuck in ordering as orphaned_payment, which means money moved and no card resulted. That needs reconciliation, not a filter.
  • Reveal policy is enabled for convenience. Per-card reveal for agents exists for narrow cases, and enabling it broadly puts a PAN one injection away from a context window.
  • Card lifecycle is unmanaged. Cards accumulate with residual balances unless void_after is set and depleted cards are cleaned up.
Watch out

Reveal is deliberately absent from the MCP tool set. If you find yourself building a way for an agent to obtain a PAN, stop and re-read why that omission exists.

Decide

A finance lead asks you to set card_require_approval to false for a procurement agent. Its guardrails are tight: 25 USD per order, 25 USD per day, and a payTo allowlist limited to the built-in Laso recipients.

Is the request safe to grant?

Check your understanding

3 questions
1

With card_require_approval true, when does the x402 payment actually happen?

2

Why is the reveal operation deliberately missing from the MCP tool set?

3

What does the Vault validate before signing the x402 payment authorization?