Skip to main content

Installation

Terminal

Quickstart

Create an organization access token (Settings > Developers) and store it in CROSSPOINT_ACCESS_TOKEN. The client reads it from there:
index.ts
You can also pass the token yourself: createCrosspoint({ accessToken: "cxp_oat_..." }). Requests wait up to 30 seconds (Polar’s SDK waits 5). Change it with createCrosspoint({ timeout: 60 }), in seconds.

API versions

@crossdev/sdk uses API version 2026-10. Pin a version with its import path:
Versions 2026-04, 2026-10 and 2027-01 are available.

Creating a checkout

Transaction splits

crosspoint.splits and crosspoint.splitRecipients are Crosspoint’s own: they share each sale with partners or vendors. See Transaction splits.
Like the rest of the SDK, they use the API’s field names (fee_bearer, product_ids) and take IDs as plain arguments (crosspoint.splits.update(id, { is_default: true })). Errors from these come as CrosspointAPIError, with statusCode and body.

Verifying webhooks

Sandbox

Use the sandbox while you build: set CROSSPOINT_ENVIRONMENT=sandbox with a sandbox access token, or pass the environment:

Local development

Point the client at a local API with baseUrl:

Next steps