We simulate the BACEN rate limit system to each of our customers.
Read more about bacen rate limit: Rate limit
To preserve the stability of the service, U4C API operations are subject to request rate-limiting policies. Specifically, for the query link operation(search DICT Key), there is also a request limitation to prevent data scanning attacks. The algorithm used to implement the rate-limiting policies is the token bucket.
How it works in U4C
All of our customers have their own buckets defined by us when integrating.
A customer bucket is defined by how much of transaction he expect to have and how U4C is classified in Bacen.
In each PIX transfer(erp-withdraw), we provide an object called 'bucket' in the response body of the API.
{
    "actualTickets": 20,
    "bucketConfig": {
          "name": "Bucket Nader - Parker",
          "ticket": 25,
          "ticketSuccess": 2,
          "replenishmentPerMinute": 120,
          "ticketNotFound": 31,
          "typeBucket": "ACCOUNT",
          "description": null,
          "bucketId": "01190fde-44de-4efc-b274-fc0f9584186d",
          "createdAt": "2024-01-22T12:50:10.302Z",
          "updatedAt": "2024-01-23T10:40:20.192Z",
}| Campo | Descrição | 
|---|---|
actualTickets | Number of available tickets (Balance of tickets - tickets used). | 
bucketConfig | Customer's bucket configuration. | 
ticket | Maximum number of tickets owned by the customer. | 
ticketSuccess | Number of tickets received per successful transaction. | 
replenishmentPerMinute | Number of tickets received per minute (Max = ticket). | 
ticketNotFound | Number of tickets lost per failed transaction. | 
typeBucket | ENUM = partner; customer; account | 
description | Description of the bucket. | 
bucketId | Identifier of the bucket. | 
createdAt | Date and time when the bucket ID was created. | 
updatedAt | Date and time of the last update to the bucket configuration. | 
How to consult my bucket in U4C
We provide an endpoint to check your bucket in realtime.
Check: https://developers.u4c.com.br/reference/get-buckets-info-by-customer-id
