Skip to main content
ArcenPay separates credentials by trust boundary, environment, and capability. This reference explains every credential type, which credentials work with which API endpoints, and how the SDKs authenticate for you. Read this page before wiring up your first integration — most integration issues come from using the wrong credential on the wrong endpoint.

Base URL

All REST endpoints are mounted under https://api.arcenpay.com/api/v1. There is no controller at the bare /v1 path; https://api.arcenpay.com/v1/* issues a 308 redirect to /api/v1/*. GET https://api.arcenpay.com/health is unauthenticated and returns 200 when the service is up.

The credentials that can authenticate a request

The legacy api_… key prefix has been removed from the platform. Existing api_… keys no longer authenticate anywhere. Regenerate any old keys as sk_… (secret), rk_… (restricted), or pk_… (publishable) in the dashboard — the raw value is shown once at creation.

Key prefixes and environments

The middle part of a key prefix encodes the environment the key was created for:
  • sk_live_…, pk_live_…, rk_live_… → created in a Production workspace environment.
  • sk_test_…, pk_test_…, rk_test_… → created in a Development workspace environment.
Keys are scoped to the workspace environment in which they were created. A sk_test_… key can only access the team’s development catalog and customers; a sk_live_… key can only access production.
Secrets from development and production are separate. Do not share *_test_* keys into production services, and never put *_live_* keys into test/staging environments where they might be logged or exposed.

Which key works where — the endpoint auth matrix

This is the most important table on this page. It tells you exactly which credential each endpoint group accepts today. Legend:
  • ✅ = explicitly supported by the auth middleware. Secret (sk_), restricted (rk_), and publishable (pk_) keys all authenticate over the same Authorization: Bearer <key> header.
  • ❌ = rejected.
  • — = not applicable.
Publishable keys are implicitly read-only: they authenticate client-safe endpoints (entitlement reads, events, coupon validation) but never authorize writes or money movement.

Dashboard-managed vs developer API

A clear boundary determines what you do through the dashboard versus what you build against with the SDKs and API keys:
Rule of thumb: if a capability appears as a screen in the dashboard (catalog, environments, invoices, webhooks, audit, agents, feature flags), it is managed there — not called from your backend. The SDKs and the node/React/agent endpoints above are the only surfaces your code should call.

Permission model

Restricted and secret keys can carry a permission list. Permissions are additive capabilities: a restricted key with tokens.create can only mint temporary access tokens, while a secret key with no explicit permissions has full access. Publishable keys are implicitly read-only — they never carry permissions and never authorize writes.

Security invariants

  1. Publishable keys never authorize money movement or private reads — endpoints opt in to publishable access via key-type allow-lists.
  2. Keys are stored as SHA-256 hashes and shown exactly once at creation. If you lose the raw value, revoke the key and create a new one.
  3. Restricted keys require at least one permission; secret keys with an empty permission list are full-access.
  4. Keys can expire (expiresAt, 1–365 days) and can be revoked at any time; lastUsedAt is tracked for auditing and cleaning up stale credentials.
  5. Embed access tokens are company-scoped and short-lived (60–900s, default 600s). They are minted only with a secret/restricted key that holds tokens.create, or with the Node SDK identify().

Generating credentials

All credentials are generated from the ArcenPay dashboard:
1

Open Settings

Go to Settings → API Keys.
2

Create a key

Click Create API Key, give it a name, choose the key type (Secret / Publishable / Restricted), pick permissions for secret/restricted keys, and set an optional expiry (1–365 days).
3

Copy the key now

The raw key is shown once — copy it to your secret manager immediately. It starts with the matching prefix (e.g. sk_test_…, pk_test_…, or rk_test_… in a development environment).
4

Set up webhook signing

Go to Settings → Webhooks, register your HTTPS endpoint, and copy the whsec_… signing secret (rotate anytime to invalidate the old one).

Using keys

Server-side (Node SDK)

The ArcenClient constructor accepts any supported key prefix:

Browser (React SDK)

The React SDK is initialized with a publishable key — safe to ship to the browser:
Publishable-key reads require no session token — the backend resolves the company from the X-Arcen-Company-Keys header.

Company-keys headers

All client-safe endpoint calls that use a publishable key must identify the company (and optionally the user) using the X-Arcen-Company-Keys and X-Arcen-User-Keys headers. Each header is a comma-separated list of key=value pairs. At least one of id, wallet, or email is required for the company.
id means your id, not ArcenPay’s. It is matched against the company’s externalId — the identifier from your own system that you supplied when the company was created. To be forgiving, an ArcenPay company id (the cm… value shown in the dashboard) is also accepted.What this means in practice: if you pass an id that matches neither, the company does not resolve. Company overrides and plan-derived rules are then evaluated as if no company were present, so the call returns a default-rule answer without raising an error. If a flag unexpectedly ignores an override you set, check that the identifier you are sending actually matches the company.When in doubt, wallet or email is the least ambiguous key to use.
The React SDK sends these headers automatically when you pass companyKeys to hooks like useCompanyEntitlements.

Keys in the SDK

sk_… / rk_… keys authenticate all server-side REST endpoints (companies, events, payment links, checkout sessions, subscription activation, access-token minting). Publishable pk_… keys authenticate client-safe reads and customer identification only.

Temporary access tokens

Mint a short-lived, company-scoped token on your server, then hand it to the browser (e.g. for ArcenEmbed):

Dashboard sessions

The dashboard authenticates with a role-based session cookie (arcen_session). API requests from the dashboard carry this cookie and respect the signed-in user’s team role. You cannot create these cookies from a third-party integration — they are issued only by the ArcenPay dashboard auth flow.

Rate limits

API-key requests are rate-limited per key with a fixed window of 5,000 requests per 60 seconds. The limit is intentionally generous — it stops runaway loops and hostile bursts without shaping normal SDK, agent, or dashboard traffic. Exceeding it returns 429 with a retry hint. Anonymous requests with no key are additionally covered by bot and shield protection. See Rate limiting for details.

Common auth failures and fixes

Never expose sk_… or rk_… keys in frontend code, client bundles, or public repositories. pk_… keys are specifically designed for the browser and grant read-only access only.
Last modified on October 22, 2026