> ## 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.

# PCX API Reference

> Integration guide for direct API access

## Overview

This reference covers every endpoint you need to integrate with PCX as an external organisation. It includes authentication, payments, transactions, virtual accounts, payment links, beneficiaries, and bank validation utilities.

If you need access to any endpoint not listed here, contact [info@pcxpay.com](mailto:info@pcxpay.com).

***

## Authentication

Every request requires two headers:

| Header          | Value                                                                 |
| --------------- | --------------------------------------------------------------------- |
| `Authorization` | `Bearer <jwt>` for user-facing flows, or the literal string `NONE`    |
| `X-Api-Key`     | Your API key for server-to-server calls, or the literal string `NONE` |

Pass `NONE` for whichever header you are not using. Most server-to-server integrations will set `Authorization: NONE` and provide a valid `X-Api-Key`.

**Base URL:** `https://prod-api.pcxpay.com/v1`

***

## Getting your API key

Use the [Create API key](/api-reference/external/introduction#authentication) endpoint to generate a key programmatically, or create one from your PCX dashboard. The full key value is shown **once at creation only** — store it securely.

***

## Pagination

All list endpoints use cursor-based pagination. Pass the `last_evaluated_key` value from the previous response's `meta` block as a query parameter on the next request. When `last_evaluated_key` is `null`, you have reached the last page.

***

## Errors

All errors follow a consistent shape:

```json theme={null}
{
  "message": "A description of what went wrong",
  "status": "error"
}
```

| Status code | Meaning                                                  |
| ----------- | -------------------------------------------------------- |
| `400`       | Invalid request — check your request body or parameters  |
| `401`       | Missing or invalid credentials                           |
| `403`       | Insufficient role for this operation                     |
| `404`       | Resource not found                                       |
| `500`       | Internal server error — contact support if this persists |
