Metadata-Version: 2.5
Name: crosspoint
Version: 0.5.0
Summary: Crosspoint API client: the Polar SDK, pointed at Crosspoint
Project-URL: Documentation, https://app.crosspoint.finance/docs/africa/sdks
License-Expression: MIT
Requires-Python: >=3.11
Requires-Dist: polar-sdk>=1.0.0a22
Description-Content-Type: text/markdown

# crosspoint

Python client for the [Crosspoint](https://crosspoint.finance) API.

Crosspoint's API is compatible with the Polar API, so this package is a thin layer over
the official `polar-sdk`: same methods and models, already pointed at
`https://api.crosspoint.finance`.

```bash
pip install crosspoint
```

```python
from crosspoint import Crosspoint

# reads CROSSPOINT_ACCESS_TOKEN (an organization access token, cxp_oat_...)
crosspoint = Crosspoint()

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

Async: `from crosspoint import CrosspointAsync`. Pin an API version (2026-04, 2026-10,
2027-01) with `from crosspoint.v2027_01 import Crosspoint`.

Naira checkout and payouts (Crosspoint's own endpoints, amounts in kobo):

```python
checkout = crosspoint.naira.checkouts.initialize(
    email="ada@example.com",
    amount=500000,  # ₦5,000
    callback_url="https://shop.example/paid",
)
# send the customer to checkout.authorization_url, then:
crosspoint.naira.checkouts.verify(checkout.reference).status  # "success"

payout = crosspoint.naira.payouts.create(
    reference="withdrawal-1",
    amount=500000,
    bank_code="000013",  # from crosspoint.naira.payouts.banks()
    account_number="0123456789",
)
```

Also `crosspoint.naira.payments`, `.invoices`, `.balance`, `.transactions`,
`.settlements`, `crosspoint.virtual_accounts`, `crosspoint.identity.checks`,
`crosspoint.balance` (USD) and `crosspoint.splits`.

Verify webhooks:

```python
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
```

Sandbox (test cards, no real money): set `CROSSPOINT_ENVIRONMENT=sandbox` with a sandbox
access token, or `Crosspoint(server="sandbox")`.

Docs: https://app.crosspoint.finance/docs/africa/sdks
