Payment Stream
Long Polling for Pix Available to the PSP
Endpoint to return a list of Pix messages received for the participant, including both credit and debit (Cash In and Cash Out).
Long Polling:This endpoint uses the long polling technique. Unlike traditional polling, the API does not respond immediately if no messages are available.
Behavior:- The API waits for a few seconds until a message becomes available
- If no message is available after the timeout, it returns status code 204 (No Content)
- After receiving the response, the PSP must make the request again to fetch new payment information
- Contains only information related to payments (Cash In and Cash Out)
Messages of type credit with status "WAITING" require a response for this payment via the /v1/pix/confirm route to confirm (accept or reject) the respective Pix transactions.
GET /payments/stream
pix.ind.readRequest
The request sent to this endpoint does not require a body, only OAuth authorization headers, parameters, and the account certificate.
ResponsesThe responses below represent Success (200) and Failures/errors for consumption.
- 🟢 200
- 🔴 400
- 🔴 401
- 🔴 403
- 🔴 404
- 🔴 429
- 🔴 500
- 🔴 503
// Pix successfully
{
"correlationId": "47a704c5-6b39-4619-98d2-cea4ab75f7ca",
"responseTime": 963,
"pix": [
{
"endToEndId": "E2E123456789545430",
"messageId": "M111111119079b30094602833bd8d208",
"txid": "TXID123456789",
"endUserAccount": "0001234",
"key": "[email protected]",
"value": "110.11",
"type": "credit",
"status": "ACCC",
"effectiveDatetime": "2025-04-07T12:23:18.000Z",
"extras": {
"favored": {
"name": "Nome completo da Silva",
"document": 12345678901,
"account": {
"participant": 12345678,
"branch": 1,
"accountNumber": 1234567890,
"type": "CACC"
}
}
}
}
]
}
OU
// Pix with error
{
"correlationId": "47a704c5-6b39-4619-98d2-cea4ab75f7ca",
"responseTime": 963,
"pix": [
{
"endToEndId": "E2E123456789545431",
"messageId": "M111111118099b90031236547ec9a809",
"txid": "TXID123456790",
"endUserAccount": "0001234",
"key": "[email protected]",
"value": "200.00",
"type": "credit",
"status": "RJCT",
"extras": {
"error": {
"code": "AB03",
"reason": "Informações complementares sobre o motivo do status"
}
}
}
]
}
OU
// No payments available
{
"correlationId": "47a704c5-6b39-4619-98d2-cea4ab75f7ca",
"responseTime": 150,
"pix": []
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Could not parse request body",
"status": 400,
"title": "Bad Request",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/BadRequest"
}
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Expired access token",
"status": 401,
"title": "invalid_token"
},
"responseTime": 0
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not allowed to access this resource",
"status": 403,
"title": "Forbidden"
}
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Entry associated with given key does not exist",
"status": 404,
"title": "Not found",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/NotFound"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"status": 429,
"title": "Rate limited",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/RateLimited"
},
"responseTime": 0
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Our service is currently experiencing an issue. We apologize for the inconvenience and are working to resolve it as soon as possible.",
"status": 500,
"title": "Internal Server Error"
}
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Service is under scheduled maintenance",
"status": 503,
"title": "Service Unavailable",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/ServiceUnavailable"
}
}
Get Stream Messages by correlationId
Endpoint to return Pix messages linked to the provided correlationId.
This endpoint queries specific payment messages (Cash In and Cash Out) associated with a correlationId previously generated during a long polling request.
GET /payments/stream/:correlationId
pix.ind.readRequest
This endpoint uses path params, where thecorrelationId must be provided in the URL.Responses
The responses below represent Success (200) and Failures/errors for consumption.
- 🟢 200
- 🔴 400
- 🔴 401
- 🔴 403
- 🔴 404
- 🔴 429
- 🔴 500
- 🔴 503
// Pix successfully
{
"correlationId": "47a704c5-6b39-4619-98d2-cea4ab75f7ca",
"responseTime": 963,
"pix": [
{
"endToEndId": "E2E123456789545430",
"messageId": "M111111119079b30094602833bd8d208",
"txid": "TXID123456789",
"endUserAccount": "0001234",
"key": "[email protected]",
"value": "110.11",
"type": "credit",
"status": "ACCC",
"effectiveDatetime": "2025-04-07T12:23:18.000Z",
"extras": {
"favored": {
"name": "Nome completo da Silva",
"document": 12345678901,
"account": {
"participant": 12345678,
"branch": 1,
"accountNumber": 1234567890,
"type": "CACC"
}
}
}
}
]
}
OU
// Pix com erro
{
"correlationId": "47a704c5-6b39-4619-98d2-cea4ab75f7ca",
"responseTime": 963,
"pix": [
{
"endToEndId": "E2E123456789545431",
"messageId": "M111111118099b90031236547ec9a809",
"txid": "TXID123456790",
"endUserAccount": "0001234",
"key": "[email protected]",
"value": "200.00",
"type": "credit",
"status": "RJCT",
"extras": {
"error": {
"code": "AB03",
"reason": "Informações complementares sobre o motivo do status"
}
}
}
]
}
OU
// No payments available
{
"correlationId": "47a704c5-6b39-4619-98d2-cea4ab75f7ca",
"responseTime": 150,
"pix": []
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Could not parse request body",
"status": 400,
"title": "Bad Request",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/BadRequest"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Expired access token",
"status": 401,
"title": "invalid_token"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not allowed to access this resource",
"status": 403,
"title": "Forbidden"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Entry associated with given key does not exist",
"status": 404,
"title": "Not found",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/NotFound"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"status": 429,
"title": "Rate limited",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/RateLimited"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Our service is currently experiencing an issue. We apologize for the inconvenience and are working to resolve it as soon as possible.",
"status": 500,
"title": "Internal Server Error"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Service is under scheduled maintenance",
"status": 503,
"title": "Service Unavailable",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/ServiceUnavailable"
},
"responseTime": 0
}