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

# Error Handling

> Common errors and how to handle them

## Error response format

All error responses follow this structure:

```json theme={null}
{
  "success": false,
  "error": "Error description",
  "details": "Additional error context"
}
```

***

## Error codes

| Code                   | Description              | Resolution                           |
| ---------------------- | ------------------------ | ------------------------------------ |
| `INVALID_AMOUNT`       | Amount validation failed | Ensure amount is greater than 0      |
| `INVALID_CURRENCY`     | Unsupported currency     | Use GBP, EUR, or USD                 |
| `PAYMENT_LINK_EXPIRED` | Link has expired         | Create a new payment request         |
| `PROVIDER_ERROR`       | Payment processing error | Retry the request or contact support |

***

## Best practices

Never surface raw error responses to end users — map error codes to user-friendly messages in your application.

For general API error codes and HTTP status meanings, see [Errors](/guides/essentials/errors).

For persistent errors, contact [info@pcxpay.com](mailto:info@pcxpay.com).
