Skip to content

Rate limits

Every authenticated Flint API request counts against a budget for its route class, both for the credential that sent it and for the merchant it acts for. A request over any budget fails with 429 RATE_LIMIT_EXCEEDED and a Retry-After header. Nothing ran, so wait that many seconds and send the same request again with the same Idempotency-Key.

The server SDKs and the CLI already retry 429s this way, up to 3 attempts. If you call the API directly, build the retry below and pace bulk work so you rarely need it.

How limits work#

Each authenticated operation belongs to one route class, such as read, write, or payment. Each class has four budgets, and Flint checks all four on every request:

  • requests per second and per minute for the credential
  • requests per second and per minute for the merchant

A credential is whatever authenticated the request: an API key, a partner app token, a CLI sign-in, a workload identity, or a Dashboard session. Buyer credentials count too: each checkout session, customer session, and invoice access token has its own credential budget. A partner app token's credential budget is per install, so each merchant that installed your app gets its own budget from it, and the merchant budget is the selected merchant's.

Operations without a credential use per-IP limits only for request budgets; endpoint-specific throttles still apply.

The merchant budget is shared by every credential acting for that merchant, including buyer traffic from your checkout and account pages. Creating more keys doesn't create more capacity. It does isolate services from each other, because one runaway service can exhaust only its own credential budget before the merchant budget.

Live mode and each sandbox have separate counters, so test traffic never spends live budget. Windows are fixed and align to the clock: a per-second window resets on each whole second, and a per-minute window at the top of each minute. A refused request doesn't count against any class budget.

Each operation in the API reference shows its class under the scopes it needs. To list every operation with its class, read x-flint-route-class from the OpenAPI document:

cURL
curl -s --compressed https://api.withflintpay.com/v1/openapi.json \
  | jq -r '.paths | to_entries[] | .key as $path | .value | to_entries[]
      | select(.value | type == "object" and has("x-flint-route-class"))
      | "\(.value["x-flint-route-class"])\t\(.key | ascii_upcase) \($path)"' \
  | sort

Default limits#

Route classApplies toPer credentialPer merchant
readRetrieving and listing resources60/sec, 3,000/min200/sec, 12,000/min
writeCreating and updating most resources20/sec, 600/min60/sec, 2,400/min
paymentOrders, checkout sessions, and payment actions20/sec, 600/min60/sec, 2,400/min
sensitive_writeCredentials, settings, and account structure10/sec, 120/min30/sec, 600/min
external_provider_actionRefunds, payouts, subscriptions, invoices, and other actions that reach a provider5/sec, 120/min20/sec, 300/min
webhook_signingSigning sandbox webhook deliveries6/sec, 360/min20/sec, 300/min
delivery_previewDelivery previews30/sec, 1,500/min100/sec, 6,000/min
delivery_quoteCheckout delivery quotes30/sec, 900/min80/sec, 3,600/min
delivery_selectionCheckout delivery selections10/sec, 300/min40/sec, 1,200/min

The per-second figure is the burst you can send; the per-minute figure sets the rate you can hold. A key can send 20 writes in one second, but only 600 in a minute, which is 10 a second sustained. Plan batch jobs from the per-minute figures: 1,000 refunds take at least 8 minutes 20 seconds on one key at 120 a minute, and about 3 minutes 20 seconds at the merchant's 300 a minute if several keys share the work.

The response's quota headers carry the quotas that applied to that request. Read them rather than hard-coding the table.

Read#

Retrieving and listing resources uses read, including merchant invoice PDF downloads. Examples: GET /v1/orders, GET /v1/customers/{customer_id}, GET /v1/payment-intents.

An invoice PDF downloaded with a buyer's invoice access token has its own budget: 2/sec and 60/min per token, and 20/sec and 600/min per merchant.

Write#

Creating and updating most resources uses write: products, customers, promotions, payment links, and invoices, plus updates to subscriptions. Examples: POST /v1/products, POST /v1/customers, PATCH /v1/customers/{customer_id}.

Payment#

Building and paying for orders uses payment, a budget separate from write so that catalog and back-office writes can't starve checkout. It covers creating and updating orders and their line items, discounts, and charges; creating, updating, and closing checkout sessions, including invoice checkout sessions; and creating, confirming, capturing, and canceling payments.

Examples: POST /v1/orders, POST /v1/checkout-sessions, POST /v1/orders/{order_id}/pay, POST /v1/payment-intents/{payment_intent_id}/confirm.

Sensitive write#

Operations that change credentials, settings, or account structure, and irreversible decisions such as accepting a dispute, use sensitive_write. They are rare in steady traffic, so the budget is tight.

Examples: POST /v1/api-keys, PATCH /v1/api-keys/{api_key_id}, POST /v1/webhook-endpoints, POST /v1/webhook-endpoints/{webhook_endpoint_id}/rotate-secret, PATCH /v1/settings, POST /v1/disputes/{dispute_id}/accept.

Creating a customer session is also a sensitive_write, at 120 a minute per key. Create one when a buyer signs in and refresh it as it expires, not on every page load.

External provider action#

Actions that send money, email, or requests to an outside provider use external_provider_action, the tightest class. It covers refunds, payouts, invoice issuing, collection, and reminders, receipt resends, creating subscriptions and pausing, resuming, renewing, canceling, or changing their plans, saved payment methods, payment review decisions, custom domains, and tax connection changes. Pace batches of these on their own queue, separately from checkout traffic.

Examples: POST /v1/refunds, POST /v1/payouts, POST /v1/invoices/{invoice_id}/issue, POST /v1/subscriptions.

A 429 on POST /v1/refunds means Flint didn't create a refund. Retry with the same Idempotency-Key after Retry-After.

Delivery#

POST /v1/delivery-previews uses delivery_preview. POST /v1/delivery-quotes uses delivery_quote. POST /v1/delivery-selections and POST /v1/delivery-selections/{delivery_selection_id}/release use delivery_selection.

IP limits#

Two limits apply per client IP address, whatever the credential. The flood limit allows 1,000 requests per second and 60,000 per minute for all traffic, and Flint checks it before authentication. The unauthenticated limit allows 50 requests per second and 3,000 per minute for routes that take no credential and for requests whose credential fails authentication. A request that authenticates doesn't spend the unauthenticated limit.

IP counters span merchants, live mode, and sandboxes, so workers behind one outbound IP share them. A burst of requests with an expired or wrong key spends the unauthenticated budget and can block that IP's unauthenticated calls, such as customer session refreshes.

Each payment link allows 1,000 public reads and 1,000 checkout starts per IP in a rolling one-minute window. Reads and starts have separate counters. These limits apply to GET /v1/payment-links/{payment_link_id}/public and POST /v1/payment-links/{payment_link_id}/resolve, alongside the IP limits above.

One signed resolution_context also allows 20 resolve requests per rolling minute, across all IPs. Read the public link once for each buyer and use that buyer's context to start their checkout. If your backend resolves for many buyers, all its calls share its outbound IP budget; pace starts within that budget and keep a separate context per buyer.

Exceeding either payment-link limit returns 429 RATE_LIMIT_EXCEEDED with Flint-Rate-Limited-Reason: resource. Retry-After is the time until the oldest counted request leaves the exhausted window, rounded up to whole seconds, from 1 to 60. Wait for it before retrying with the same context and idempotency key.

Public shops#

Each shop allows 1,000 public reads per IP in a rolling one-minute window. GET /v1/shops/{shop_id}/public and GET /v1/shops/{shop_id}/listings/{shop_listing_id}/public share one counter for the shop, alongside the IP limits above. Exceeding it returns 429 RATE_LIMIT_EXCEEDED with Flint-Rate-Limited-Reason: resource, and Retry-After works as it does for public payment links. See Public reads.

POST /v1/shops/{shop_id}/resolve has a separate budget of 1,000 checkout starts per IP per shop in a rolling minute. Each resolution_context also allows 20 starts per minute. Both limits return 429 RATE_LIMIT_EXCEEDED with Retry-After.

The 429 response#

A rate-limited request returns HTTP 429 with the standard error envelope. This example shows the response for a refund request, which requires an idempotency key.

JSON
{
  "error": {
    "type": "rate_limit_error",
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded.",
    "error_source": "caller",
    "request_id": "req_01KWM6XXNG7HPKAB71A0H44JJA",
    "doc_url": "https://developers.withflintpay.com/docs/errors#rate_limit_exceeded",
    "remediation": {
      "retry": "same_request",
      "next_steps": "Wait for Retry-After, then resend the same request. Keep the same Idempotency-Key."
    }
  }
}
HeaderMeaning
Retry-AfterWhole seconds to wait before retrying, from 1 to 3600. Every 429 carries it. For a class budget, it's the time until the longest exhausted window resets.
Flint-Rate-Limited-ReasonWhich limit the request hit, so you know what to change.
RateLimit-Policy, RateLimitThe class quotas and what's left of them. See Quota headers.

Flint-Rate-Limited-Reason takes one of these values:

Status
  • credential
    This credential's budget is spent. Slow this caller down, or move unrelated work to its own key.
  • customer
    The budget shared by one customer's sessions is spent. Reduce requests across that customer's sessions.
  • merchant
    The merchant budget shared by every credential is spent. Reduce combined throughput across all keys, workers, and buyer traffic. More keys won't help.
  • global_ip
    An IP limit. Check the combined traffic from this IP and any failing credentials.
  • setup_flow
    An onboarding throttle. Run setup once and store the key.
  • demo_session
    A demo sandbox limit. Create your own sandbox and key for sustained work.
  • resource
    A limit on repeating one action against one resource. See Action limits.

When the limit belongs to one resource or address, param names it, such as payment_intent_id for a receipt resend or email for verification codes sent to one address. Without param, the limit applies to the caller as a whole. Log the request_id either way, so support can trace the exact request.

A 429 is always a throttle: it counts requests over a window of at most an hour, and waiting clears it. Anything else that counts is a quota, and a quota is a 409, never a 429. Don't confuse a rate limit with a count that has run out:

  • HTTP 429
    RATE_LIMIT_EXCEEDEDRetry the same request
    A throttle over a window of at most an hour. remediation.retry is same_request: wait for Retry-After, then resend the identical request with the same Idempotency-Key.
  • HTTP 409
    A count that stops every request of this kind, such as five pending reports, the open event streams for an environment, or a day's demo sessions. remediation.retry is none. details[0].limit is the fixed count, and details[0].resets_at is when time alone frees capacity, when it does. Follow details[0].reason and next_steps, and send a new request after the reset.

Quota headers#

Responses to merchant credentials carry two headers once the route-class check has run. They use the Structured Field List syntax of the IETF RateLimit headers draft (draft-ietf-httpapi-ratelimit-headers-11), with four policies in this order:

HTTP
RateLimit-Policy: "write.credential.second";q=20;w=1, "write.credential.minute";q=600;w=60, "write.merchant.second";q=60;w=1, "write.merchant.minute";q=2400;w=60
RateLimit: "write.credential.second";r=19;t=1, "write.credential.minute";r=588;t=37, "write.merchant.second";r=57;t=1, "write.merchant.minute";r=2290;t=37
ParameterHeaderMeaning
qRateLimit-PolicyThe quota for the window.
wRateLimit-PolicyThe window, in seconds.
rRateLimitRequests left in the window after this one, never below 0.
tRateLimitWhole seconds until the window resets, at least 1.

Each policy name is the route class, then credential or merchant, then second or minute. The quotas in the response are the ones that applied and are authoritative. Browsers can read both headers through CORS.

The headers appear on every status and content type once the class check has run, including PDFs, redirects, handler errors, and idempotent replays. A replay reports the current quota, not the one stored with the original response. They're absent:

  • for buyer credentials, such as checkout sessions and customer sessions
  • on routes that take no credential, and on IP-limit responses
  • when Flint refused the request before the class check, for an authentication, scope, or mode error
  • when the shared limiter is unavailable

Action limits and onboarding throttles add no policy of their own; their responses can still carry the quota headers from the class check. Use Flint-Rate-Limited-Reason to tell which limit refused a request, and on a 429, wait for Retry-After rather than computing a wait from t.

Retry a 429#

Retrying a rate-limited writeResponse
Your serverFlintPOST /v1/customers with Idempotency-Key: customer-import-4821429 RATE_LIMIT_EXCEEDED, Retry-After: 2waits 2 seconds plus jitterthe same request, same Idempotency-Key201 with the customer
  1. Your server sends POST /v1/customers with Idempotency-Key: customer-import-4821 to Flint
  2. Flint returns 429 RATE_LIMIT_EXCEEDED, Retry-After: 2 to Your server
  3. Your server sends waits 2 seconds plus jitter to Your server
  4. Your server sends the same request, same Idempotency-Key to Flint
  5. Flint returns 201 with the customer to Your server
  1. Check remediation.retry. Retry only when it's same_request.
  2. Wait for Retry-After. It's the shortest wait that can succeed. Add a little random jitter so parallel workers don't all retry in the same second.
  3. Increase backoff if another 429 arrives. Double the wait each attempt, with jitter, up to a cap, and always wait at least the new Retry-After.
  4. Send the same request. If it carried an Idempotency-Key, keep the same key. The 429 means nothing ran, but a retry after a lost response or timeout might not be so clear. With the same key, Flint runs a write at most once and replays the original result, marked Idempotency-Replayed: true.
  5. Stop after a few attempts. Surface repeated throttling to your monitoring. Daily caps, such as the demo quota, return 409 LIMIT_REACHED with none; schedule a new request after resets_at instead.
JavaScript
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

async function withRateLimitRetry(send, { maxAttempts = 5, maxWaitMs = 60_000 } = {}) {
  let backoffMs = 500;

  for (let attempt = 1; ; attempt++) {
    const res = await send();
    if (res.status !== 429 || attempt === maxAttempts) return res;

    const body = await res.clone().json().catch(() => null);
    if (body?.error?.remediation?.retry !== "same_request") return res;

    const retryAfter = Number(res.headers.get("Retry-After"));
    const waitMs = retryAfter > 0 ? retryAfter * 1000 : backoffMs;
    if (waitMs > maxWaitMs) return res;

    await sleep(waitMs + Math.random() * 250);
    backoffMs = Math.min(backoffMs * 2, 30_000);
  }
}

// Generate the key once, outside the retried function,
// so every attempt sends the same one.
const idempotencyKey = "customer-import-4821";

const res = await withRateLimitRetry(() =>
  fetch("https://api.withflintpay.com/v1/customers", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.FLINT_API_KEY}`,
      "Content-Type": "application/json",
      "Idempotency-Key": idempotencyKey,
    },
    body: JSON.stringify({ email: "ada@example.com", name: "Ada Lovelace" }),
  }),
);

Warning: Don't retry in a tight loop

Refused requests don't spend class budget, but they still spend the IP flood limit and do nothing until the window resets. If your retries are themselves rate limited, lower your concurrency rather than retrying harder.

Stay under the limits#

Use webhooks instead of polling. Payment, refund, payout, and dispute outcomes arrive as webhook events as they happen. Polling GET /v1/orders/{order_id} every second for each open order spends read budget in proportion to your volume and still learns the outcome later.

Fetch lists, not loops of reads. GET /v1/orders?page_size=100 is one request; reading the same 100 orders one at a time is 100. Use list endpoints with pagination for sync and reconciliation jobs.

Pace batch jobs. Run a backfill or nightly sync from a queue with fixed concurrency, not a Promise.all over thousands of items. Size the rate from the per-minute budget of the class the job uses, and leave room for live traffic on the same merchant. Spread scheduled jobs that start on the hour across a few minutes.

Slow down before the budget runs out. When a response's RateLimit header shows r=0 for any policy, wait that policy's t seconds before the next request:

JavaScript
// Seconds to wait before the next request, or 0 if every policy has room.
function quotaWait(res) {
  const field = res.headers.get("RateLimit");
  if (!field) return 0;

  let wait = 0;
  for (const policy of field.split(",")) {
    const remaining = Number(/;r=(\d+)/.exec(policy)?.[1]);
    const reset = Number(/;t=(\d+)/.exec(policy)?.[1]);
    if (remaining === 0 && reset > wait) wait = reset;
  }
  return wait;
}

Give each service its own key. The merchant budget is still shared, but per-key budgets keep one runaway service from starving the rest, and Flint-Rate-Limited-Reason tells you which side you hit.

Plan for buyer traffic. Checkout sessions and customer sessions spend the merchant budget too. Leave headroom during sales and launches, and run heavy back-office jobs outside them.

Keep rate limits away from buyers. A rate-limited call inside checkout should be retried behind the scenes. The buyer should see a short delay, never a rate-limit error.

Find the hot loop. List request logs with status_bucket=client_error, then narrow by caller_id or query to see which caller and route are sending the most requests.

Action limits#

Some actions also limit how often you can repeat them on one resource, on top of the class budget. Each returns 429 RATE_LIMIT_EXCEEDED with Flint-Rate-Limited-Reason: resource and the remaining wait in Retry-After.

ActionLimitparam
Resend a payment receipt, POST /v1/payment-intents/{payment_intent_id}/send-receiptOnce every 5 minutes per paymentpayment_intent_id
Resend an order receipt, POST /v1/orders/{order_id}/send-receiptOnce every 5 minutes per orderorder_id
Send an invoice reminder, POST /v1/invoices/{invoice_id}/send-reminderOnce every 5 minutes per invoiceinvoice_id
Check a custom domain, POST /v1/custom-domains/{custom_domain_id}/validateOnce every 60 seconds per domainNone

Buyer credentials can start three subscription payment retries per billing period, including retries the merchant started. That is a quota: 409 LIMIT_REACHED with reason payment_retries_per_period, limit: 3, and retry none. The reset time is not known while the failed billing boundary remains in place, so Flint omits resets_at. Retrying with the same Idempotency-Key returns the original retry and does not count again. Report generation has its own cap of five pending reports per merchant and environment. It's a quota, not a throttle: the sixth returns 409 LIMIT_REACHED with reason pending_reports, limit 5, and the pending reports in blocking_resources. Wait for one to finish, then create the report again as a new request. See Reporting.

Setup and onboarding throttles#

The self-serve onboarding flow has its own throttles, much tighter than the class budgets, per client IP and per email address:

EndpointPer IPPer email
POST /v1/onboarding/start3/sec, 10/min3 per 30 seconds
POST /v1/onboarding/verify-email6/sec, 30/min6 per 10 seconds
POST /v1/api-keys with an onboarding session2/sec, 12/minNone

The POST /v1/api-keys limit applies only to onboarding session tokens; other credentials keep the sensitive_write budget alone. The onboarding request also spends the sensitive_write budget once the session exists. GET /v1/onboarding/state uses read, and POST /v1/onboarding/advance uses external_provider_action.

After 20 incorrect verification codes for one email, POST /v1/onboarding/start and POST /v1/onboarding/verify-email both return 429 for that email until an hour after the first of them. Correct codes don't count.

These 429s carry Flint-Rate-Limited-Reason: setup_flow, and the per-email ones have param: email. Run onboarding once per merchant, store the key, and reuse it. A pipeline that onboards on every run hits these throttles almost at once.

Demo sandbox limits#

Demo keys, the temporary test keys that POST /v1/demo-sessions returns, run on much lower budgets, sized for trying the API rather than building on it:

Route classPer credentialPer merchant
read10/sec, 120/min20/sec, 240/min
write2/sec, 30/min4/sec, 60/min
payment1/sec, 10/min2/sec, 20/min
sensitive_write1/sec, 10/min2/sec, 20/min
external_provider_action1/sec, 10/min2/sec, 20/min
delivery_preview5/sec, 60/min10/sec, 120/min
delivery_quote3/sec, 45/min6/sec, 90/min
delivery_selection1/sec, 15/min3/sec, 40/min

POST /v1/demo-sessions has its own limits: 1 a second and 8 a minute per IP are throttles, and their 429s carry Flint-Rate-Limited-Reason: demo_session. The cap of 10 per IP in any 24 hours is a quota. Past it, the request returns 409 LIMIT_REACHED with reason daily_demo_sessions, limit 10, and resets_at, the time the oldest of those 10 is more than 24 hours old. Create another demo session after resets_at.

One demo sandbox can be active per client at a time. Creating another while one is active returns 409 ALREADY_EXISTS, with the active session in details[0].current_resource. To get a new key, send its resource_id to POST /v1/demo-sessions/{demo_session_id}/reset.

For anything sustained, create your own sandbox: its keys get the default limits and its data persists.

OAuth token endpoints#

/v1/oauth/token, /v1/oauth/revoke, /v1/oauth/contexts, /v1/oauth/device/authorize, and /v1/oauth/device/reauthorize answer in OAuth's error format instead of Flint's envelope. A rate-limited request returns 429 with Retry-After and Flint-Rate-Limited-Reason:

JSON
{
  "error": "temporarily_unavailable",
  "error_description": "Too many requests. Retry after the number of seconds in Retry-After."
}

A partner app can mint 600 partner app tokens a minute with grant_type=client_credentials, counted after client authentication and beside the per-IP budget. Over it, Flint-Rate-Limited-Reason is resource. Cache one token per mode and mint again when it expires.

When the Flint CLI polls /v1/oauth/token for a device sign-in too often, the response is 400 with "error": "slow_down", as the device flow standard (RFC 8628) requires. Add 5 seconds to the polling interval.

Raise your limits#

If your expected steady or peak traffic exceeds these limits, contact Flint before you launch that workload. Ask at Flint Help with the endpoints involved, your expected steady and peak request rates, any batch jobs that run alongside checkout traffic, and the merchants the traffic runs under.

Next steps#

IdempotencyMake every write retry safe, including after a lost response.Error handlingThe error envelope, remediation hints, and one handler for every error.WebhooksGet outcomes as events instead of polling for them.Debugging requestsSearch request logs to find what is spending your budget.

Unsuccessful card payments#

Card authorization has a separate failure budget: 5 per checkout session, 10 per buyer IP, 3 per card fingerprint, and 10 per billing email per hour, isolated by merchant environment. A pending authorization reserves budget; confirmed success releases it. Exhaustion returns 429 with Retry-After. Show the buyer when they can try again instead of automatically retrying a card decline.

Was this helpful?