Checkout (public)

Stream checkout updates

A Server-Sent Events stream for the checkout page. It sends an event named change, with empty data, whenever the checkout status may have changed; fetch GET /api/v1/invoices/{id}/status again when it arrives. A comment line arrives every 20 seconds, and the stream ends after 4 minutes so the browser reconnects; EventSource does that on its own. The stream can miss a change while it reconnects, so also fetch the status once each time it opens. Rate limits: 30 stream starts per IP address, 100 per network and 20 per invoice, per 4 minutes.

GET
/api/v1/invoices/{id}/events

Path Parameters

id*string

Invoice id, starting with inv_.

Response Body

The event stream.

response?stringtext/event-stream
Example Request
curl -X GET 'https://example.com/api/v1/invoices/string/events'
Example Response
"retry: 3000\n\nevent: change\ndata: \n\n"