const requestId = 's4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG';
const response = await fetch(`https://service.pcibooking.net/api/card-view-request/${requestId}/end`, {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key'
}
});
console.log(await response.json());
import requests
request_id = 's4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG'
response = requests.post(
f'https://service.pcibooking.net/api/card-view-request/{request_id}/end',
headers={'Authorization': 'APIKEY your-api-key'}
)
print(response.json())
{
"requestId": "s4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG",
"status": "Ended",
"createdAt": "2026-01-12T14:00:00Z",
"expiresAt": "2026-01-12T14:15:00Z",
"linkOpenedAt": "2026-01-12T14:02:10Z",
"lastOtpSentAt": "2026-01-12T14:02:30Z",
"otpSentCount": 1,
"viewCount": 1,
"maxViews": 3,
"firstViewedAt": "2026-01-12T14:03:05Z",
"lastViewedAt": "2026-01-12T14:03:05Z",
"endedAt": "2026-01-12T14:05:00Z",
"endReason": "Customer",
"locked": false,
"metadata": "BOOKING-12345"
}
Card Display
End Card Display Session
Stop a Card Display with OTP session before it expires. The link and any codes stop working.
POST
/
api
/
card-view-request
/
{requestId}
/
end
const requestId = 's4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG';
const response = await fetch(`https://service.pcibooking.net/api/card-view-request/${requestId}/end`, {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key'
}
});
console.log(await response.json());
import requests
request_id = 's4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG'
response = requests.post(
f'https://service.pcibooking.net/api/card-view-request/{request_id}/end',
headers={'Authorization': 'APIKEY your-api-key'}
)
print(response.json())
{
"requestId": "s4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG",
"status": "Ended",
"createdAt": "2026-01-12T14:00:00Z",
"expiresAt": "2026-01-12T14:15:00Z",
"linkOpenedAt": "2026-01-12T14:02:10Z",
"lastOtpSentAt": "2026-01-12T14:02:30Z",
"otpSentCount": 1,
"viewCount": 1,
"maxViews": 3,
"firstViewedAt": "2026-01-12T14:03:05Z",
"lastViewedAt": "2026-01-12T14:03:05Z",
"endedAt": "2026-01-12T14:05:00Z",
"endReason": "Customer",
"locked": false,
"metadata": "BOOKING-12345"
}
Card Display with OTP Guide
How the OTP verification flow works end-to-end
TtlMinutes runs out. From then on, the link and any codes stop working. See After the session ends for what the viewer sees.
Ending a session that has already ended or expired changes nothing. The call returns the session status either way, so it is safe to repeat.
If the session has a CallbackUrl, PCI Booking sends a callback with event set to ended. See Callbacks.
Ending the session does not clear a card that is already shown on the viewer’s screen. It stops any further views.
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
| none | 400 | requestId is not a 32-character alphanumeric string. |
| none | 401 | The Authorization header is missing, badly formatted, or the API key is not valid. The response body is empty. See Authentication and Permission Failures. |
| -1003 | 403 | Your user does not have the Retrieve cards or the Perform Card display operations permission, or your IP address is not in your account’s allowed IP list. message names the reason. |
| -160 | 404 | No card display session with this ID exists for your account. A session created by another account returns the same response. |
| -150 | 500 | The session could not be read, or the end could not be saved. |
Parameters
Authentication
API key only. This endpoint does not accept access tokens or session tokens.Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. The x-pcibooking-api-key header is also accepted. See the Authentication guide.Path Parameters
The
requestId returned by Initiate Card Display with OTP.const requestId = 's4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG';
const response = await fetch(`https://service.pcibooking.net/api/card-view-request/${requestId}/end`, {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key'
}
});
console.log(await response.json());
import requests
request_id = 's4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG'
response = requests.post(
f'https://service.pcibooking.net/api/card-view-request/{request_id}/end',
headers={'Authorization': 'APIKEY your-api-key'}
)
print(response.json())
Response
The session status after the end, with the same fields as Get Card Display Session Status.status is Ended and endReason is Customer, unless the session had already expired or ended for another reason.
{
"requestId": "s4iMrBQioE0JBCJIMN9kjnsLNDeGZUmG",
"status": "Ended",
"createdAt": "2026-01-12T14:00:00Z",
"expiresAt": "2026-01-12T14:15:00Z",
"linkOpenedAt": "2026-01-12T14:02:10Z",
"lastOtpSentAt": "2026-01-12T14:02:30Z",
"otpSentCount": 1,
"viewCount": 1,
"maxViews": 3,
"firstViewedAt": "2026-01-12T14:03:05Z",
"lastViewedAt": "2026-01-12T14:03:05Z",
"endedAt": "2026-01-12T14:05:00Z",
"endReason": "Customer",
"locked": false,
"metadata": "BOOKING-12345"
}

