Skip to main content

Authenticate your requests

Every request to the Prudra API must include an API key. API keys are scoped to an organisation and grant full access to all resources in that organisation.

API key formats

Prudra uses two key formats depending on your environment: Test keys make real API calls but payments are processed in stub mode by default — no real crypto moves. Live keys process real payments on mainnet.
Never use a live key in development or commit any key to version control. Use environment variables to keep keys out of your code.

Get an API key

  1. Go to dashboard.prudra.com and sign in
  2. Click Settings in the left sidebar
  3. Click API Keys
  4. Click Create API key
  5. Enter a name for the key (e.g. “Development” or “Production server”)
  6. Click Create
The raw key is shown once. Copy it immediately — it cannot be retrieved again.Store the key in your environment:

Pass the key in requests

All API requests use Bearer token authentication in the Authorization header:
When using the SDK, initialise() handles this automatically for all SDK calls. When making direct API calls:

Error responses

A missing or invalid key returns HTTP 401:

List and revoke keys

Go to Settings → API Keys in dashboard.prudra.com. All active keys for your organisation are listed (raw key values are never shown). Click Revoke next to any key to immediately invalidate it.

Best practices

  • Use one key per service — if a key is compromised, you can revoke it without affecting other services
  • Store keys in environment variables, never in code or config files
  • Use test keys (prv_test_sk_) in development and CI
  • Rotate live keys periodically or immediately if compromised
  • The apiKeyId field on payment logs lets you trace which key was used for each payment