Checkout events (SSE)
Server-Sent Events for the pay page. Not wrapped in . Events include checkout.connected, checkout.heartbeat, checkout.awaiting_transfer, checkout.3ds_required, checkout.completed.
GET
/
payment
/
checkout
/
events
Checkout events (SSE)
curl --request GET \
--url https://server.staging.vestrapay.app/v1/payment/checkout/events \
--header 'x-access-code: <api-key>'const options = {method: 'GET', headers: {'x-access-code': '<api-key>'}};
fetch('https://server.staging.vestrapay.app/v1/payment/checkout/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://server.staging.vestrapay.app/v1/payment/checkout/events"
headers = {"x-access-code": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.staging.vestrapay.app/v1/payment/checkout/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-access-code: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Authorizations
Access code from initialize. Query access_code is also accepted.
Response
200
text/event-stream
⌘I
Checkout events (SSE)
curl --request GET \
--url https://server.staging.vestrapay.app/v1/payment/checkout/events \
--header 'x-access-code: <api-key>'const options = {method: 'GET', headers: {'x-access-code': '<api-key>'}};
fetch('https://server.staging.vestrapay.app/v1/payment/checkout/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://server.staging.vestrapay.app/v1/payment/checkout/events"
headers = {"x-access-code": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.staging.vestrapay.app/v1/payment/checkout/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-access-code: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}