I want to ask about the best solution for synchronize batch of items from our database to Square.
Right now during the synchronization smaller batch there is no problem but when I try synchronize bigger (1000) after while I have request throttling. What is the limit of request by which requests are throttled?
In our own testing, batches of 25 - 100 are the sweet spot. Lowering 25-100 / batch will resolve with no real difference in execution times. For example 10 requests of 25 @ 1 second == 1 request of 250 @ 10 seconds.
Square does have rate limits but we don’t document the limits. We encourage you to handle the limit gracefully by building a retry mechanism. This mechanism should have an exponential backoff schedule to reduce requests when volume is necessary. Also some randomness wouldn’t hurt to avoid a thundering herd effect.