Getting started
Common error types
- Authentication failures
- API rate limit exceeded
- Invalid request parameters
- Data availability issues
- Network connectivity problems
Error response format
PayPal API errors follow a standard format:Error codes
Error | Message | Description |
---|---|---|
INTERNAL_SERVICE_ERROR | Internal service error. | Something unexpected occurred on the server. |
INVALID_REQUEST | Invalid request - see details. | The request is not well-formed or is syntactically incorrect or violates the schema. |
INVALID_RESOURCE_ID | The resource was not found. | The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible. |
RESULTSET_TOO_LARGE | Result set size is greater than the maximum limit. Change the filter criteria and try again. | The request returned more items than the maximum limit. To reduce the result set, include additional query |
Troubleshooting steps
1. Authentication issues
Symptoms
- HTTP 401 Unauthorized responses
- “invalid_client” errors
- Token expiration messages
Solutions
2. Rate limiting problems
Symptoms
- HTTP 429 Too Many Requests
- Temporary service unavailable
- Slow response times
Solutions
3. Data query issues
Invalid date ranges
Missing transaction data
4. Network and connectivity issues
Connection timeouts
Diagnostic tools
API response logging
Health check implementation
Error prevention best practices
- Implement comprehensive error handling.
- Use appropriate request timeouts.
- Monitor API rate limits.
- Validate input parameters.
- Log errors with sufficient detail.
- Set up alerting for critical failures.
- Regular health checks and monitoring.
- Keep API credentials secure and up-to-date.