Protocol and format
Requests and responses are exchanged over HTTPS, in JSON (RFC 8259) encoded in UTF-8. Requests with a body must send theContent-Type: application/json header.
Response envelope
Successful responses containsuccess: true and, when there is content, the data field. Failure responses adopt a single envelope, in which the message field describes the cause.
message field is returned in Portuguese. Integrations must base their logic on the HTTP status and, where present, on the code field, and not on the message text.
Idempotency
Idempotency ensures that repeating a request, as a result of a network failure or a timeout, does not produce a duplicate financial effect. In Pix, card and subscription charge operations, the idempotency key is sent in theIdempotency-Key header. Repeating the request with the same key returns the transaction already recorded.
idempotencyKey field of POST /v1/transfers, and is mandatory.
It is recommended to generate a universally unique identifier (UUID) for each payment intent and to reuse it in every retry of the same intent.
Pagination
Listing operations accept thepage parameter, starting at 1, and the pageSize parameter, limited to 100 records. The response contains the records in data and the totals in pagination.
GET /v1/transactions paginates by offset, through the offset parameter, and reports the total number of records in totalRows. GET /v1/subscriptions uses the limit parameter in place of pageSize.
Rate limit
Up to 1000 requests per minute are allowed per source IP address. Every response reports the state of the limit in the headers below.
When the limit is exceeded, the response is
429, accompanied by the retry-after header, which states the waiting time, in seconds, before a new request.
Response codes
Retry policy
Network failures and5xx responses may be retried, provided the idempotency key is preserved. 4xx responses indicate a condition that does not change with mere repetition and require correction of the request, with the exception of the 429 response, which must be repeated after the interval stated in retry-after. Increasing intervals between retries are recommended.