Errors and rate limits
Errors and status codes
| Status | Code | Meaning |
|---|---|---|
400 | VALIDATION_ERROR (including a user.phone with no digit), CARD_NUMBER_DETECTED, NUL_CHARACTER_DETECTED | Invalid body. parameter names the field. |
400 | EVENT_NOT_PAYMENT | A final payment status was sent for an event that is not a money event. |
401 | AUTH_ERROR | Missing or invalid key. |
403 | SCOPE_ERROR, SANDBOX_KEY_FORBIDDEN, ACCOUNT_SHARED_ACROSS_PROJECTS | Key lacks the scope, a sandbox key was used for an operation that needs a live one, or the account spans several projects. |
404 | NOT_FOUND | Unknown event_id, account or case. |
409 | EVENT_ID_CONFLICT | event_id reused with a different body. |
409 | PAYMENT_STATUS_FINAL | The payment already has a final status that this one cannot replace. |
413 | PAYLOAD_TOO_LARGE | Body above the limit. |
429 | RATE_LIMIT_EXCEEDED | See rate limits. |
500 | INTERNAL_ERROR | An internal failure, for example scoring failed to persist. Safe to retry the same event_id and body. |
503 | ASYNC_UNAVAILABLE, COMPILED_RULES_UNAVAILABLE, PROJECT_POLICY_UNAVAILABLE, RATE_LIMIT_UNAVAILABLE | Async ingestion, the compiled ruleset (sync and async) or the project policy is unavailable, or the rate limiter is not ready. Nothing was scored or stored. Retry with backoff. |
Per-endpoint status lists are in the API reference.
Rate limits
These are the limits on api.defraudo.com for every client. They are counted per minute, in a fixed window.
| What is counted | Limit |
|---|---|
| Requests per key, per method and route | 1,000 per minute |
POST /v1/fp/collect, per key | 10,000 per minute |
POST /v1/fp/collect, per key and caller address | 60 per minute |
| Failed key lookups (a well-formed key that does not exist or is inactive), per caller address and key environment | 60 per minute |
Responses that pass through the limiter carry a RateLimit-Limit header with the limit that applies to the request. If you expect higher peaks, contact us.
When a limit is hit you get 429. Wait Retry-After seconds before you retry. A 429 from the request limits also carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. A 429 from failed key lookups has Retry-After for that lock; any RateLimit-* headers on it describe the request quota, not the lock. Some 429s are not about these quotas: a rule simulation started while another one is running answers 429 with Retry-After: 2.