API key authentication
Include your API key in thex-api-key header for all requests:
How API keys work
Each API key is:- Hashed on creation — Rinne stores only a SHA-256 hash. The raw key is returned exactly once at creation time (show-once) and can never be retrieved again.
- Scoped with permissions — Every key carries its own set of permissions, enforced on every request. By default, keys are created with full access (
*.*), but you can restrict them to specific operations. - Optionally time-limited — You can set an expiration date. Expired keys are automatically rejected.
- Soft-revocable — Revoked keys stop authenticating immediately but their records are retained for audit.
Authentication scope
Your API key determines which resources you can access based on the company it belongs to:- Organization scope — Organization API keys can access organization-level resources and all merchants under the organization.
- Merchant scope — Merchant API keys can only access the merchant’s own resources.
Managing API keys
API key management is available through the API and requires JWT authentication — a leaked API key cannot be used to create or revoke keys, even if it contains permissions for doing so.API key management endpoints require JWT authentication and the
api_key.create, api_key.list, or api_key.delete permissions respectively.Creating an API key
1
Authenticate with JWT
You must be authenticated with a JWT token (not an API key) and have the
api_key.create permission.2
Create the key
string
required
A label to identify the key (max 100 characters).
string[]
Permission strings granted to the key. Omit for full access (
*.*). Must be valid permissions from the permission catalog.string
Future ISO 8601 datetime when the key stops authenticating. Omit for a non-expiring key.
3
Store the raw key securely
The response includes the full key — this is the only time it will be shown:
Listing API keys
Retrieve your company’s active (non-revoked, non-expired) keys. The raw key is never returned — only the maskedprefix and last4 are shown:
Revoking an API key
Revoke a key to immediately stop it from authenticating. Revocation is permanent and cannot be undone:204 No Content response.
Managing merchant API keys
Organizations can manage API keys for their merchants using the merchant-scoped endpoints:Limits
Each company (organization or merchant) can have at most 20 active API keys at any time. Active keys are those that are neither revoked nor expired. If you reach the limit, revoke unused keys before creating new ones.User authentication (JWT)
For user-facing applications, Rinne provides JWT-based authentication for individual users.Login flow
- User login: Authenticate with email/phone and password
- Company selection: If user has multiple companies, select one
- Use JWT token: Include token in Authorization header
JWT token structure
JWT tokens include:- User ID and identifiers
- Selected company context
- User permissions and roles
- Token expiration time
Password management
First access
New users receive a verification code via email:Forgot password
Request a password reset code:Change password
Authenticated users can change their password:Security best practices
Store API keys securely
Store API keys securely
- Use environment variables or a secrets manager for API keys
- Never commit keys to version control
- Use scoped permissions — avoid
*.*for keys that only need specific operations
Rotate and revoke keys regularly
Rotate and revoke keys regularly
- Set expiration dates on API keys when possible
- Revoke keys that are no longer in use
- Rotate keys periodically by creating a new key before revoking the old one
- If a key is compromised, revoke it immediately via JWT authentication
Use HTTPS only
Use HTTPS only
All API requests must use HTTPS. HTTP requests will be rejected.
Implement rate limiting
Implement rate limiting
Implement exponential backoff for retries and respect rate limits to avoid throttling.
Validate webhook signatures
Validate webhook signatures
When receiving webhooks, validate the signature to ensure requests are from Rinne.
Error responses
Authentication errors return a 401 status code:API key management endpoints return a
403 if you attempt to access them with API key authentication instead of JWT. This is a security measure — a leaked API key must not be able to create or revoke other keys.Next steps
Create your first transaction
Follow the quickstart guide
User management
Manage users, roles, and permissions

