Transactions

Wait for Pix payment

This endpoint employs the Server-Sent Events (SSE) resource to establish a communication channel between the client and server.

Consumption of this endpoint is achieved by utilizing an EventSource

Below is a simple example illustrating the usage of the EventSource:

const eventSource = new EventSource(
  'https://api.edubank.com.br/v1/transactions/{transaction_id}/pix/{payment_id}/sse',
);
eventSource.onmessage = ({ data }) => {
  console.log('New message', JSON.parse(data));
};

Important point

  • It is crucial to remember that the x-api-key and authorization must be included in the call to the Edubank API
  • For smoother inclusion of the x-api-key and authorization headers in the call, we recommend using the event-source-polyfill package. You can find this package on event-source-polyfill
  • The EventSource should be closed upon receiving the desired message.
get/v1/transactions/{transaction_id}/pix/{payment_id}/sse

Request

Path parameters

payment_idstring required
transaction_idstring required

Response

Connection successfully stabilized.

idstring required

Message event id

Example response

{
  "data": {
    "payment_event": {
      "payment_method": {
        "payment_received_at": "2026-09-01T23:59:59+00:00",
        "expected_on": "2026-10-01"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.