> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sp3ndpay.shop/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Reference

> API error codes and responses

## Error Format

```json theme={null}
{
  "error": {
    "code": "error_code",
    "message": "Human-readable description",
    "request_id": "req_xxx"
  }
}
```

## HTTP Status Codes

| Code | Meaning      |
| ---- | ------------ |
| 400  | Bad Request  |
| 401  | Unauthorized |
| 403  | Forbidden    |
| 404  | Not Found    |
| 429  | Rate Limit   |
| 500  | Server Error |

## Authentication Errors

**invalid\_api\_key** (401)

```json theme={null}
{"error": {"code": "invalid_api_key", "message": "API key invalid or revoked"}}
```

**missing\_api\_key** (401)

```json theme={null}
{"error": {"code": "missing_api_key", "message": "No API key in header"}}
```

**rate\_limit\_exceeded** (429)

```json theme={null}
{"error": {"code": "rate_limit_exceeded", "message": "Rate limit exceeded"}}
```

## Product Errors

**invalid\_url** (400)

```json theme={null}
{"error": {"code": "invalid_url", "message": "Not valid Amazon or eBay link"}}
```

**product\_unavailable** (404)

```json theme={null}
{"error": {"code": "product_unavailable", "message": "Product unavailable"}}
```

**unsupported\_marketplace** (400)

```json theme={null}
{"error": {"code": "unsupported_marketplace", "message": "Marketplace not supported"}}
```

## Cart Errors

**cart\_not\_found** (404)

```json theme={null}
{"error": {"code": "cart_not_found", "message": "Cart not found or expired"}}
```

**cart\_expired** (400)

```json theme={null}
{"error": {"code": "cart_expired", "message": "Cart expired, create new"}}
```

**shipping\_unavailable** (400)

```json theme={null}
{"error": {"code": "shipping_unavailable", "message": "Cannot ship to destination"}}
```

## Order Errors

**order\_not\_found** (404)

```json theme={null}
{"error": {"code": "order_not_found", "message": "Order not found"}}
```

**invalid\_address** (400)

```json theme={null}
{"error": {"code": "invalid_address", "message": "Address invalid or incomplete"}}
```

**wallet\_screening\_failed** (403)

```json theme={null}
{"error": {"code": "wallet_screening_failed", "message": "Wallet failed screening"}}
```

## Best Practices

**Retry Logic:**

* Retry 429 and 5xx errors with exponential backoff
* Don't retry 4xx errors (except 429)

**Logging:**

* Always log `request_id` for support

**User Messages:**

* Map error codes to user-friendly messages
* Don't expose technical details to users

<Card title="Contact Support" icon="life-ring" href="/support/contact">
  Get help with errors
</Card>
