Documentation Index
Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt
Use this file to discover all available pages before exploring further.
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:| Format | Environment | Use when |
|---|---|---|
prv_test_sk_... | Test / development | Local development, CI, staging environments |
prv_live_sk_... | Live / production | Production servers making real payments |
Get an API key
- Dashboard
- SDK
- cURL
- Go to dashboard.prudra.com and sign in
- Click Settings in the left sidebar
- Click API Keys
- Click Create API key
- Enter a name for the key (e.g. “Development” or “Production server”)
- Click Create
Pass the key in requests
All API requests use Bearer token authentication in theAuthorization header:
initialise() handles this automatically for all SDK calls. When making direct API calls:
Error responses
A missing or invalid key returns HTTP 401:| Cause | Resolution |
|---|---|
| Key missing from header | Add Authorization: Bearer prv_test_sk_... to the request |
| Key format wrong | Keys start with prv_test_sk_ or prv_live_sk_ — check for typos |
| Key revoked | Create a new key in the dashboard. Revoked keys cannot be reactivated. |
| Wrong environment | Test keys don’t work against live endpoints and vice versa |
| Key belongs to different org | Each key is org-scoped — use the correct key for your organisation |
List and revoke keys
- Dashboard
- SDK
- cURL
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
apiKeyIdfield on payment logs lets you trace which key was used for each payment
Related
- API key best practices — key rotation, scoping, and security
- Manage API keys — creating, listing, and revoking keys
- Authentication concept — how Bearer token authentication works internally

