Skip to content

Rate limits

Rate limits keep shops fast and protect them from abuse. A limited request gets 429 rate_limited with a Retry-After header giving the seconds to wait.

These are the current limits. They may change, so always honour Retry-After rather than hard-coding the numbers.

What Limit Counted per
All requests 8 a second, bursts up to 30 Client IP
All requests 100 a second Token
POST /contact 5 a minute Shopper IP
POST /checkouts 10 a minute Storefront and shopper IP
Customer sign-in codes and verification 5 a minute Shopper IP, and email
Failed private-token sign-ins 30 a minute Client IP

IPv6 addresses are counted by their /64 prefix.

After 30 failed private-token requests in a minute, further private-token requests from that IP get 429 until the minute is up.

With a private token, every request comes from your server, so without more information all your shoppers would share one IP’s limits. Send each shopper’s IP in X-Sevigram-Buyer-IP:

  • Contact: without the header, every shopper shares your server’s 5 a minute.
  • Checkout: without the header, only the per-token limit applies, so the per-shopper limit doesn’t protect you from one abusive shopper.

If your server sits behind a load balancer or CDN, take the shopper’s IP from the header your proxy sets, and only trust it when the server can’t be reached any other way. Loom’s starter handles this with TRUST_PROXY and CLIENT_IP_HEADER; see Deploying.

  • Retry 429 and 503 responses after Retry-After.
  • Retry GET requests freely.
  • Retry POST /checkouts only with the same Idempotency-Key, so the retry returns the same checkout session instead of creating another. See Checkout and orders.