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

# Python SDK

> Use the Crosspoint Python SDK, crosspoint on PyPI

## Installation

**uv**

```bash Terminal theme={null}
uv add crosspoint
```

**pip**

```bash Terminal theme={null}
pip install crosspoint
```

## Quickstart

Create an organization access token (**Settings > Developers**) and store it in `CROSSPOINT_ACCESS_TOKEN`. The client reads it from there:

```python main.py theme={null}
from crosspoint import Crosspoint

crosspoint = Crosspoint()

for product in crosspoint.products.iter_list(limit=10):
    print(product)
```

You can also pass the token yourself: `Crosspoint("cxp_oat_...")`.

Requests wait up to 30 seconds (Polar's SDK waits 5). Change it with `Crosspoint(timeout=60.0)`, in seconds.

## API versions

`crosspoint` uses API version 2026-10. Pin a version with its import path:

```python theme={null}
from crosspoint.v2027_01 import Crosspoint
```

Versions 2026-04 (`v2026_04`), 2026-10 (`v2026_10`) and 2027-01 (`v2027_01`) are available.

## Async client

```python async_main.py theme={null}
import asyncio

from crosspoint import CrosspointAsync


async def main() -> None:
    async with CrosspointAsync() as crosspoint:
        customer_state = await crosspoint.customers.get_state_external(
            "customer_external_id"
        )
        print(customer_state)


asyncio.run(main())
```

Both clients work as context managers (`with` / `async with`) and close their connections when the block ends.

## Transaction splits

`crosspoint.splits` and `crosspoint.split_recipients` are Crosspoint's own: they share each sale with partners or vendors. See [Transaction splits](https://staging-docs.crosspoint.finance/africa/splits.md). Like the rest of the SDK, they take keyword arguments with the API's field names (`crosspoint.splits.create(name=..., shares=[...])`, `crosspoint.splits.update(id, is_default=True)`) and return objects (`split.id`, `recipient.owed`).

```python theme={null}
recipients = crosspoint.split_recipients.list(status="pending")
```

Errors from these raise `CrosspointAPIError`, with `status_code` and `body`.

## Verifying webhooks

```python theme={null}
import os

from crosspoint.webhooks import WebhookVerificationError, validate_event

try:
    event = validate_event(body, headers, os.environ["CROSSPOINT_WEBHOOK_SECRET"])
except WebhookVerificationError:
    ...  # not from Crosspoint: reject it with a 403
```

## Sandbox

Use the [sandbox](https://staging-docs.crosspoint.finance/africa/sandbox.md) while you build: set `CROSSPOINT_ENVIRONMENT=sandbox` with a sandbox access token, or pass the server:

```python theme={null}
crosspoint = Crosspoint(server="sandbox")
```

## Local development

Point the client at a local API with `base_url`:

```python theme={null}
crosspoint = Crosspoint(base_url="http://127.0.0.1:8000")
```

## Next steps

* [Webhook delivery](https://staging-docs.crosspoint.finance/integrate/webhooks/delivery.md): a full webhook handler
* [API reference](https://staging-docs.crosspoint.finance/api-reference): every endpoint, with Python examples


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.