Server-sent events with payment status changes
GET
/v1/public/checkout-sessions/{session_id}/events
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.feitpay.com/v1/public/checkout-sessions/example/events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.feitpay.com/v1/public/checkout-sessions/example/events';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.feitpay.com/v1/public/checkout-sessions/example/eventsEmits event: status messages whose data is a CheckoutStatusEvent. Clients should fall back to polling the session every 3 seconds.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”session_id
required
string
Responses
Section titled “Responses”SSE stream.
Media typetext/event-stream
string
Resource not found (or not visible to this tenant).
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}