Authentication
Include your API key in every request as a Bearer token. Generate a key using the POST /keys endpoint — no account required.
Keys are hashed on our end and cannot be recovered. Store your key securely, you will only see it once when it's generated.
POST /keys
POSTGenerate a new API key. No authentication required. Rate limited to 1 key per IP per hour.
Response:
DELETE /keys
DELETERevoke your own API key. Requires authentication with the key being revoked. This action is permanent and immediate.
Response:
POST /cards
POSTRequest a virtual card for a purchase. Card details are returned once and cannot be retrieved again.
Response:
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | number | Yes | Dollar amount for the card. Max $100 (production). Beta: max $1.00; requests above $1.00 will be rejected. |
| merchant_category | string | Yes | One of: web_hosting, cloud_compute, api_services, saas_tools, domains, databases, other |
| ttl_minutes | integer | No | Minutes until the card auto deletes. Min: 1, Max: 1440. Default: 1440 (24 hours). Card is permanently deleted after expiry. |
Card auto-deletes after the TTL expires or after first use, whichever comes first. Card details are returned only on this response — they cannot be retrieved again through any endpoint.
GET /limits
GETSee your real time spending capacity. All amounts in cents.
Response:
Fields:
monthly_limit- Your total monthly spending limit in cents. 50000 = $500.00monthly_spent- Amount spent so far this month in cents.monthly_remaining- Amount you can still spend this month in cents.per_transaction_limit- Maximum per card amount in cents. 10000 = $100.00. Beta: 100 = $1.00cards_remaining- Number of cards still available in the pool.
All values reflect real time availability. During beta, limits reflect the actual card pool and $1.00 per transaction cap.
Errors
All errors return a JSON body with a code and human-readable message.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_params | Missing or invalid parameters (bad amount, unknown category, invalid TTL). |
| 400 | amount_exceeded | Requested amount exceeds the per transaction limit. Beta: max $1.00. |
| 401 | invalid_key | API key is missing, malformed, or has been revoked. |
| 403 | limit_exceeded | Monthly spending limit reached. |
| 429 | rate_limited | Too many requests. Limit: 1 request per minute per key. |
| 429 | key_rate_limited | Key generation rate limit. 1 key per IP per hour. |
| 503 | no_cards_available | Card pool is exhausted. No cards currently available. |
Quick Start Examples
Generate an API Key
curl:
Node.js:
Python:
Create a Card
curl:
Node.js:
Python:
Full Workflow
Node.js:
Python:
Security Best Practices
ClawdCards issues real virtual card numbers. Treat all card data with the same care as your own credit card.
- Never log card numbers. Card details (number, CVV, expiry) should never be written to logs, console output, or monitoring tools. Use the
card_last_fourfrom the transactions endpoint for reference. - Use environment variables for your API key. Never hardcode your key in source code, commit it to version control, or expose it in client side code.
- Card details are returned once. The
POST /cardsresponse is the only time you will see full card details. Store them securely in memory for immediate use, do not persist them to disk or database. - HTTPS only. All API requests must use HTTPS. HTTP requests will be rejected.
- Revoke compromised keys immediately. If your API key is exposed, revoke it with
DELETE /keysand generate a new one. - Respect card TTL. Cards auto-delete after their configured TTL (default 24 hours) or after first use. Do not attempt to reuse expired cards.
- Agent integration. If giving card access to an AI agent, scope the agent's permissions so it can only request cards for approved merchant categories and amounts.