Skip to main content
API keys are the credentials your servers and the browser send in the Authorization: Bearer header. They are created in the dashboard’s Settings → API Keys, stored as SHA-256 hashes, and shown exactly once at creation.

Key types

The prefix also encodes the environment: *_live_* for production, *_test_* for development. See Authentication for the full key model and the endpoint auth matrix.

API key object

The API never returns the full raw key after creation. The raw value (sk_…) is returned only once from the create response. If you lose it, revoke and recreate.

Managing keys in the Dashboard

API keys are created, inspected, and revoked directly within the Provider Dashboard:
  1. Navigate to Settings → API Keys in your ArcenPay Dashboard.
  2. Click Create Secret Key or Create Publishable Key.
  3. For secret or restricted keys, specify the name, expiration window (optional), and granted permissions (e.g. tokens.create, usage.consume).
  4. Copy and securely store the raw key. ArcenPay stores only the SHA-256 hash and will never display the raw secret again.
  5. To invalidate a compromised key immediately, click Revoke Key in the dashboard.
Root API keys are provisioned exclusively through the dashboard to guarantee administrative security and multi-factor authorization. Automated services do not provision root API keys via programmatic REST.

Programmatic token generation

For customer sessions, client embeds, and delegated permissions, ArcenPay provides two dedicated REST endpoints callable using your Secret or Restricted API keys:
  1. Create a temporary access token (POST /api-keys/tokens): Mints a short-lived arc_tok_… token (60–900s TTL) scoped to a single company. Ideal for passing to ArcenEmbed or client-side widgets without leaking your root secret key.
  2. Create an access token (POST /access-tokens): The programmatic backend behind the SDK identify() method. Upserts the customer’s company and user records in one call and returns a customer session token.
Explore each endpoint’s parameters, schema, and interactive testing console in the sidebar.

Permission catalog

Best practices

  • Name keys by environment and purpose (production-billing, staging-webhook-test).
  • Set an expiry for short-lived projects; rotate on a schedule.
  • Use restricted keys with only the permissions each service needs.
  • Store raw keys in a secret manager — the platform stores only hashes.
Last modified on September 19, 2026