Documentation Index
Fetch the complete documentation index at: https://docs.fype.dev/llms.txt
Use this file to discover all available pages before exploring further.
Rate Limiting & Performance
To ensure the stability and availability of the payment engine for all merchants, Fype enforces rate limits on API requests.Rate Limiting Architecture
Fype uses an Atomic Token-Bucket algorithm powered by Redis. This ensures that limits are enforced consistently across all our API nodes.Limits by Environment
| Environment | Limit per Minute | Status Code |
|---|---|---|
| Test Mode | 100 requests/min | 429 Too Many Requests |
| Live Mode | 500 requests/min | 429 Too Many Requests |
Handling Rate Limit Errors
When you exceed the limit, the Fype API returns a429 Too Many Requests response with the following JSON body:
Best Practices
- Implement Retries with Backoff: Use an exponential backoff strategy (e.g., 1s, 2s, 4s) when you receive a 429 error.
- Check the
Retry-AfterHeader: Fype includes aRetry-Afterheader indicating the number of seconds to wait before retrying. - Optimize Bulk Operations: If you need to fetch many payments, use the Paginated List API with a higher
limitinstead of making multiple single-payment requests.
Performance Tips
1. Persistent Connections
Our SDKs (Node.js and Python) use connection pooling. Reusing the Fype client instance across requests significantly reduces latency by avoiding repeated TLS handshakes.2. Regional Latency
Fype’s core API is hosted in the Mumbai (India) region to provide the lowest possible latency for Indian payment gateways like Razorpay. For the best performance, host your backend in a nearby region.3. Asynchronous Webhooks
Do not block your webhook listener with heavy processing.- Recommended: Receive the webhook, verify the signature, enqueue a background job in your system, and return
200 OKimmediately. - Anti-pattern: Performing complex database migrations or sending multiple emails before responding to Fype. This can lead to timeouts and unnecessary retries from Fype’s worker.