Skip to main content
The FYATU CaaS API v3.20 uses API key authentication — no tokens to exchange, no JWTs to decode. Every request must include a valid API key, and the key’s scopes determine what the request is allowed to do.

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.
API keys are shown once at creation. If you lose a key, revoke it and create a new one. Never log keys or commit them to version control.

Sending the API Key

Pass your key in the Authorization 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 answers 404 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 answers 403 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.
cards:read includes the full card number and CVV through /secure-details. Keep it off keys for services that do not display card details.

Idempotency-Key Header

For write operations (POST), you can supply an Idempotency-Key header to safely retry requests without risking duplicate operations.
How it works:
  • If a request with the same Idempotency-Key is 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_PROGRESS with Retry-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.
An Idempotency-Key belongs to one request. Sending it again with a different method, path or body returns 422 IDEMPOTENCY_KEY_REUSED and nothing is executed: use a new key for a new operation. A key longer than 255 characters returns 422 IDEMPOTENCY_KEY_TOO_LONG.
When to use it: Fund card, create cardholder, issue card, and any write operation that should not be duplicated if your network times out and you retry.

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 answers 429 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 returns 403 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

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.
Issue one key per microservice or integration, each with the minimal required scopes. This lets you revoke a single key without disrupting other services.
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.
Network failures happen. Always supply Idempotency-Key on fund, issue, and create requests so a retry never double-charges your balance.
Log X-RateLimit-Remaining on every response. If it keeps approaching zero, cache reads on your side and rely on webhooks rather than polling.