Error Format
All API errors return a JSON object with amessage array:
message field is always an array, even for single errors.
HTTP Status Codes
| Code | Meaning | When |
|---|---|---|
| 200 | Success | Request completed successfully |
| 201 | Created | Resource created (cart, order) |
| 204 | No Content | Resource deleted |
| 400 | Bad Request | Validation error, business logic error, or expired token |
| 401 | Unauthorized | Missing x-cc-app or User-Agent header |
| 404 | Not Found | Endpoint doesn’t exist |
| 500 | Server Error | Internal timeout or service failure |
Common Errors
Authentication
| Error Message | Cause | Resolution |
|---|---|---|
"no Authorization token was found" | Token expired or missing | Call POST /session for a new token |
"no x-cc-app was found" | Missing x-cc-app header | Add your partner app ID header |
"Unauthorized" | Missing User-Agent header | Ensure User-Agent header is set |
Cart Operations
| Error Message | Cause | Resolution |
|---|---|---|
"Error, insufficient inventory" | Cards no longer available | Refresh inventory and try different cards |
Checkout
| Error Message | Cause | Resolution |
|---|---|---|
"Insufficient funds" | Payment failed | Check payment details or use different method |
Wallet
| Error Message | Cause | Resolution |
|---|---|---|
"OVER_THE_LIMIT" | Viewed 10+ cards in 24h | Complete wallet verification flow |
"SENDS_EXHAUSTED" | Max verification sends reached | Wait for limit reset |
"SUBMISSIONS_EXHAUSTED" | Max code attempts reached | Wait for limit reset |
Retry Strategy
Safe to Retry (Idempotent)
- All
GETrequests POST /session(creates or returns existing)POST /carts(creates or returns existing)
Do NOT Retry
POST /orders— may create duplicate ordersPUT /orders/:id— may process payment twice
Recommended Approach
Timeouts
The API has internal timeouts of 50-90 seconds for most operations. If a downstream service doesn’t respond, you’ll receive a500 with no body.
Recommended client timeout: 60 seconds for most endpoints, 120 seconds for checkout.