# Errors

The API uses standard HTTP status codes. All errors return a consistent JSON structure.

Status
Category
Description
400
Validation
Malformed JSON or field constraints that are not valid.
401
Unauthorized
Merchant or signature headers that are not valid or missing.
403
Access denied
Missing required permissions.
404
Not found
Resource or endpoint does not exist.
422
State error
Request conflicts with current system state.
429
Rate limit
Request quota exhausted.
500
Internal
Server-side failure.
**Error response structure**

```json
{
  "error": {
    "code": "3.02",
    "messages": [
      "The user's card balance has insufficient funds."
    ],
    "recommended_message_for_user": "Please try a different payment method."
  }
}
```

For the full list of error codes, see the error codes reference.

## Handle WAF errors

The **Blocked by WAF** error indicates that a Web Application Firewall (WAF) has prevented your request due to a policy violation. The most common cause is sending a request to the wrong base URL. This error often arises from mismatched endpoints and base URLs in API requests.

1. Confirm that the full URL matches a valid endpoint in the Solidgate API reference.
2. Ensure that the endpoint corresponds to the correct base URL for that domain.


For example, if you attempt to cancel a subscription using the endpoint `/subscription/cancel-by-customer` at the base URL `pay.solidgate.com/api/v1`, you receive a **Blocked by WAF** error. The correct base URL for subscription actions is `subscriptions.solidgate.com/api/v1`.

> The WAF is configured to block IP addresses from sanctioned countries to increase security and ensure compliance with international regulations. To avoid this issue, ensure your IP address is not from a sanctioned country.


## API logs

API logs capture API request and response records for operations.

This helps developers and integrators troubleshoot issues, monitor traffic, and investigate suspicious or unintended API usage.

To view API log entries in the Solidgate Hub:

Go to 
Developers
> 
API logs
.
Find the log entry you need and select it.
View log entry details, including 
Status
, 
Method
, 
Path
, 
Host
, 
IP address
, and 
Date (UTC)
.
Expand 
Request body
and 
Response body
to see the JSON payloads sent and received.
For help, contact us.