API Documentation
Integrate your AI agents with Peppi Card
Quick Start
1
Create an Agent
Go to Dashboard → Agents → Create Agent
2
Generate API Token
Click "Generate Token" and save it securely
3
Authenticate & Spend
Use the token to make authorized purchases
Authentication
All API requests require a Bearer token:
Authorization: Bearer clwd_your_token_hereEndpoints
GET
/api/agents/credentialsGet your agent's limits and card information.
Response:
{
"success": true,
"limits": {
"dailySpendLimitCents": 10000,
"remainingDailySpendCents": 7500,
"currentBalanceCents": 47500
},
"card": {
"last4": "4242",
"status": "ACTIVE"
}
}POST
/api/jitRequest authorization for a purchase.
Request Body:
{
"amountCents": 1500,
"merchantName": "Coffee Shop"
}Success Response:
{ "success": true, "message": "Transaction Approved" }Error Response (402):
{ "success": false, "reason": "DAILY_LIMIT_EXCEEDED" }Python Example
import requests
TOKEN = "clwd_your_token"
headers = {"Authorization": f"Bearer {TOKEN}"}
# Make a purchase
response = requests.post(
"https://peppipay.com/api/jit",
headers=headers,
json={"amountCents": 1500, "merchantName": "Store"}
)
if response.json().get("success"):
print("Purchase approved!")Error Codes
| Status | Meaning |
|---|---|
| 200 | Success |
| 401 | Invalid or missing token |
| 402 | Transaction denied |
| 403 | Agent deactivated |