Skip to main content
Every request to the RemitFlex API must be authenticated using an API key passed as a Bearer token in the Authorization header. There are no cookies, sessions, or OAuth flows — authentication is stateless and key-based. This page explains how to obtain and use your keys, what scopes control access to, and how to handle authentication errors in your integration.

Sending Your API Key

Include your API key on every request using the Authorization header:
Authorization: Bearer YOUR_API_KEY
curl -X POST https://api.remitflex.com/v1/payments \
  -H "Authorization: Bearer rf_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"amount": 100, "currency": "USDC"}'

Key Types

RemitFlex issues two types of API key, identifiable by their prefix:
PrefixEnvironmentDescription
rf_live_ProductionMoves real funds; use in your live application
rf_test_SandboxNo real funds moved; use during development and testing
Never use a live key (rf_live_) in development, test suites, or CI pipelines. Live keys interact with real payment rails and will move actual funds.

Obtaining API Keys

API keys are managed in the RemitFlex Dashboard:
  1. Log in to your RemitFlex Dashboard.
  2. Navigate to Settings → API Keys.
  3. Click Create new key, select the desired scope, and confirm.
  4. Copy the key immediately — it is only shown once at creation time.
If you lose a key, revoke it and create a new one. Revoked keys cannot be restored.

Key Scopes

Each API key is issued with exactly one scope that determines what it can do. Assign the most restrictive scope appropriate for the key’s intended use.
ScopeDescription
readRead-only access to all resources — suitable for dashboards and reporting tools
writeCreate and modify resources — suitable for most server-side integrations
adminFull access, including API key management and account settings — use with care
Most backend integrations should use write keys. Reserve admin keys for internal tooling where key rotation or account configuration is required programmatically.
Every endpoint in the API reference lists the minimum scope required to call it. For example, listing payments requires read, while creating a payment requires write.

Authentication Errors

When authentication fails, the API returns a JSON error object with an error.code field that identifies the specific failure reason.
Returned when the Authorization header is missing entirely or when the key value is malformed or does not exist.
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "No valid API key was provided."
  }
}

Best Practices

Following these practices keeps your API keys — and your users’ funds — safe:
Store keys in environment variables. Never hardcode an API key in source code. Use environment variables (e.g. REMITFLEX_API_KEY) or a secrets manager such as AWS Secrets Manager, HashiCorp Vault, or Doppler.
  • Never commit keys to version control. Add .env files to .gitignore and audit your repository history if a key is accidentally committed.
  • Use the minimum required scope. A reporting service should use a read key, not a write or admin key.
  • Rotate keys periodically. Revoke and replace keys on a regular schedule and immediately upon any suspected compromise.
  • Use separate keys per environment. Use rf_test_ keys in staging and CI, and reserve rf_live_ keys for production deployments only.
  • Monitor key usage. The Dashboard shows per-key request history. Unusual spikes may indicate a leaked key.