Skip to main content

Cards

A Card is a virtual spending instrument issued to an agent. Cards have policy controls that determine how they can be used.

Card Types

UsageDescription
singleOne-time use, auto-closes after first transaction
multiReusable for multiple transactions

Creating a Card

curl -X POST https://api.useproxy.ai/v1/cards \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "cust_xxx",
    "agentId": "agent_xxx",
    "usage": "multi"
  }'

Card Fields

FieldTypeDescription
customerIdstringOwner of the card
agentIdstringAgent assigned to use the card
usagestringsingle or multi
statusstringCard status

Card Status

StatusDescription
activeCard can be used for transactions
frozenTemporarily blocked
closedPermanently deactivated

Policy Controls

Cards can have their own policy overrides:
{
  "policy": {
    "maxAmount": 10000,
    "allowedMerchants": ["amazon.com"],
    "lockToFirstMerchant": true
  }
}

Accessing Card Details

Card credentials are retrieved via the details endpoint after declaring an intent:
curl -X POST https://api.useproxy.ai/v1/cards/card_xxx/details \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "intentId": "int_xxx",
    "purpose": "Purchase supplies"
  }'
Response:
{
  "pan": "4111111111111111",
  "exp": "12/28",
  "cvv": "123"
}

Card Actions

Freeze a Card

curl -X POST https://api.useproxy.ai/v1/cards/card_xxx/freeze \
  -H "Authorization: Bearer your_api_key"

Unfreeze a Card

curl -X POST https://api.useproxy.ai/v1/cards/card_xxx/unfreeze \
  -H "Authorization: Bearer your_api_key"

Close a Card

curl -X POST https://api.useproxy.ai/v1/cards/card_xxx/close \
  -H "Authorization: Bearer your_api_key"

Next Steps