m2pfintech
Integration Guide

Idempotency & Rate Limits

Prevent duplicate transactions with idempotency keys and handle rate limiting gracefully.

Ensure reliable integration with idempotency for financial operations and graceful rate limit handling.


Idempotency

For financial operations (credit, debit, reversal), use idempotency keys to prevent duplicate processing.

How It Works

Idempotency Keys

KeyWhereDescription
externalTransactionIdRequest bodyYour unique transaction reference. M2P deduplicates on this field within a configurable window
X-Request-IdHTTP headerOptional request-level identifier for tracing and debugging

Always use a unique externalTransactionId for every new transaction. UUIDs are recommended. If the same ID is sent again, the original response is returned without processing a new transaction.


Rate Limits

API rate limits protect the platform and ensure fair usage across all tenants.

TierRequests per MinuteBurst Capacity
Standard600100
Premium3,000500
EnterpriseCustomCustom

Handling Rate Limits

When rate-limited, you will receive an HTTP 429 Too Many Requests response.

Recommended approach: Implement exponential backoff with jitter.

Retry Decision Matrix

HTTP StatusActionRetry?
200SuccessNo
400Fix request — validation errorNo
401Re-authenticate, then retryYes (once)
409Duplicate — already processedNo
429Rate limited — wait and retry with backoffYes
500Server error — retry with backoffYes (max 3)
502Bad gateway — retry with backoffYes (max 3)
503Service unavailable — retry with backoffYes (max 5)
504Gateway timeout — retry with backoffYes (max 3)

On this page