How It Works
Getting Your API Key
1
Open the CaaS portal
Go to platform.fyatu.com and log in to your CaaS account.
2
Navigate to API Keys
Click Developers → API Keys in the left sidebar.
3
Create an API key
Click Create API Key. Name the key, choose its environment (
LIVE or SANDBOX), and select the scopes it needs.4
Copy the key immediately
The full key is shown once at creation time. Copy it to your secrets manager now — it cannot be retrieved later.
Sending the API Key
Pass your key in theAuthorization header as a Bearer token. An X-API-Key: <key> header is also accepted, for clients that cannot set Authorization.
Live keys begin with fyatu_live_sk_ and sandbox keys with fyatu_test_sk_.
Authentication Failure Response
When authentication fails, the API returns an error using the standard response envelope:401 — Invalid API key
403 — Insufficient scope
Environments and base URLs
Each API key is bound to one environment, and a key never sees the other environment’s data: a cardholder or card created under the other environment answers404 as if it did not exist.
The sandbox is a separate system with its own sign-up: nothing created there reaches live, and a
sandbox key only works on the sandbox host. Going live means changing the base URL and the key, and
nothing else in your code.
Already a CaaS customer with a
SANDBOX key created on platform.fyatu.com?
That key keeps working on https://api.fyatu.com/api/v3.20, against your account’s own sandbox data.Scopes
A key can only call the endpoints its scopes allow; anything else answers403 INSUFFICIENT_SCOPE.
Give each key only what its service needs.
GET /ping, GET /account and GET /event-types need a valid key and no scope.
Idempotency-Key Header
For write operations (POST), you can supply an Idempotency-Key header to safely retry requests without risking duplicate operations.
- If a request with the same
Idempotency-Keyis received within 24 hours, the API replays the original response without re-executing the operation. - Replayed responses include the header
Idempotency-Replayed: true. - Keys must be unique strings of up to 255 characters. A UUID or a deterministic hash of your operation parameters works well.
- After 24 hours, the key expires and a request with the same key is treated as a new operation.
- While a request is still being processed, a retry with the same key is answered
409 IDEMPOTENCY_IN_PROGRESSwithRetry-After: 2, and is not executed. Retry after a moment to receive the original result. This is what makes a retry after a timeout safe even when the first attempt is still running.
Rate Limits
Your business has one rate limit, in requests per second, shared by all its API keys; reads served from the cache are free. Over it, the API answers429 RATE_LIMIT_EXCEEDED with a Retry-After
header. See Rate Limiting.
IP Allowlisting
API keys can optionally restrict which IP addresses may use them. If you configure an IP allowlist in the portal and a request arrives from an unlisted IP, the API returns403 IP_NOT_ALLOWED.
This is strongly recommended for server-to-server LIVE integrations. Leave the allowlist empty during development or when your server IPs are dynamic.
Authentication Error Reference
Best Practices
Store keys in secrets managers
Store keys in secrets managers
Never hard-code API keys in source files. Use environment variables or a secrets manager (AWS Secrets Manager, HashiCorp Vault, Doppler, etc.). Rotate keys at least every 90 days.
Use separate keys per service
Use separate keys per service
Issue one key per microservice or integration, each with the minimal required scopes. This lets you revoke a single key without disrupting other services.
Configure IP allowlisting for LIVE
Configure IP allowlisting for LIVE
For production workloads, set an IP allowlist on your LIVE API keys. This adds a layer of defense even if a key is leaked — the attacker cannot use it from an unlisted IP.
Use Idempotency-Key on all write operations
Use Idempotency-Key on all write operations
Network failures happen. Always supply
Idempotency-Key on fund, issue, and create requests so a retry never double-charges your balance.Monitor your rate limit headers
Monitor your rate limit headers
Log
X-RateLimit-Remaining on every response. If it keeps approaching zero, cache reads on your side and rely on webhooks rather than polling.
