Skip to main content

Payment Stream

The following set of endpoints is responsible for Payment Stream management.


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)
Important!

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
Requires authorization for the scope: pix.ind.read


Request

The request sent to this endpoint does not require a body, only OAuth authorization headers, parameters, and the account certificate.

Responses

The responses below represent Success (200) and Failures/errors for consumption.

// 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": []
}

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
Requires authorization for the scope: pix.ind.read


Request

This endpoint uses path params, where the correlationId must be provided in the URL.

Responses

The responses below represent Success (200) and Failures/errors for consumption.

// 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": []
}