---
title: Authentication
description: Bearer API keys and hosted checkout tokens for the Vortex Payments API.
---

# Authentication

The OpenAPI contract defines the auth schemes. Public product traffic uses a bearer API key.

## Public API key

```http
Authorization: Bearer vp_test_...
```

| Scheme               | Type                          | Where                          |
| -------------------- | ----------------------------- | ------------------------------ |
| `api-key`            | HTTP bearer                   | Public `/v1/*` routes          |
| `checkout-token`     | Query `token`                 | Hosted checkout / pay surfaces |
| `provider-signature` | Header `X-Provider-Signature` | Inbound processor webhooks     |

## Environments

| Environment | Base URL                 |
| ----------- | ------------------------ |
| Production  | `https://api.vortex.nyc` |
| Local       | `http://localhost:3210`  |

## Examples

### TypeScript SDK

```ts
import { createClient } from "@vortex-api/vortex";

const client = createClient({
  baseUrl: "https://api.vortex.nyc",
  headers: {
    Authorization: `Bearer ${process.env.VORTEX_API_KEY}`,
  },
});
```

### curl

```bash
curl -sS "https://api.vortex.nyc/v1/customers" \
  -H "Authorization: Bearer $VORTEX_API_KEY"
```

## Hosted surfaces

Hosted checkout and payment-request pages authenticate with a short-lived `token` query parameter. That token is not a substitute for a server-side API key.

:::warning Never log API keys, webhook secrets, or checkout tokens. Auth stays at the HTTP edge. Better Auth issues keys; Hono on `api.vortex.nyc` authenticates public traffic. Internal Worker handlers are not a public door. :::
