Skip to main content

Error Handling

The FYATU API uses conventional HTTP response codes and returns detailed error messages with machine-readable error codes to help you handle errors programmatically.

Response Format

All API responses follow a consistent format:
Always include the requestId from the meta object when contacting support — it helps us trace your request through our systems.

HTTP Status Codes

Error Codes

Each error response includes a machine-readable code field:

Common Error Scenarios

Authentication Errors (401)

Missing Token
Solution: Include the Authorization: Bearer {token} header in your request.
Expired Token
Solution: Refresh your token via POST /v3/auth/refresh or request a new one via POST /v3/auth/token.
Insufficient Scope
Solution: Your app type doesn’t have access to this endpoint. A Collection App cannot access Card endpoints and vice versa.

Validation Errors (400)

Solution: Check the details array for specific field requirements and fix the request payload.

Insufficient Balance (402)

Solution: Fund your business wallet before retrying. The required amount includes applicable fees.

Resource Not Found (404)

Solution: Verify the resource ID exists and belongs to your app.

Duplicate Reference (409)

Solution: Use a unique externalReference for each new operation.

Rate Limiting (429)

Solution: Implement exponential backoff in your retry logic.

Error Handling Best Practices

1. Always Check the Response

2. Handle Specific Error Codes

3. Implement Retry with Backoff

4. Log Errors for Debugging

Idempotency

For operations that create resources, use the externalReference field to prevent duplicates:
This prevents duplicate charges if your request times out and you retry.

Rate Limits

Exceeding rate limits will result in 429 Too Many Requests. Implement exponential backoff in your retry logic.