const requestID = 'ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV';
const response = await fetch(
`https://service.pcibooking.net/api/capturecard/${requestID}`,
{
headers: {
'Authorization': 'APIKEY your-api-key'
}
}
);
const data = await response.json();
console.log('Session is open, created at', data.CreateTime);
console.log('Request ID:', data.RequestID);
import requests
request_id = 'ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV'
response = requests.get(
f'https://service.pcibooking.net/api/capturecard/{request_id}',
headers={
'Authorization': 'APIKEY your-api-key'
}
)
data = response.json()
print('Session is open, created at', data['CreateTime'])
print('Request ID:', data['RequestID'])
{
"RequestID": "ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV",
"SenderId": "RoeeSandbox",
"CreatorReference": "Card capture request",
"TTL": 600,
"CallBackURL": "http://httpbin.org/post",
"CreateTime": "2019-11-20T11:36:46.8062564Z",
"FormChargeResult": "Pending",
"Properties": {
"Language": "en",
"AutoDetectCardType": true,
"ShowCVV": true,
"Success": "https://yoursite.com/success?cardToken={cardToken}",
"Failure": "https://yoursite.com/failure"
}
}
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.
Session-Based Card Entry Form
Retrieve Card Entry Session Details
Retrieve the parameters configured for a card form session.
GET
/
api
/
capturecard
/
{RequestID}
const requestID = 'ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV';
const response = await fetch(
`https://service.pcibooking.net/api/capturecard/${requestID}`,
{
headers: {
'Authorization': 'APIKEY your-api-key'
}
}
);
const data = await response.json();
console.log('Session is open, created at', data.CreateTime);
console.log('Request ID:', data.RequestID);
import requests
request_id = 'ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV'
response = requests.get(
f'https://service.pcibooking.net/api/capturecard/{request_id}',
headers={
'Authorization': 'APIKEY your-api-key'
}
)
data = response.json()
print('Session is open, created at', data['CreateTime'])
print('Request ID:', data['RequestID'])
{
"RequestID": "ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV",
"SenderId": "RoeeSandbox",
"CreatorReference": "Card capture request",
"TTL": 600,
"CallBackURL": "http://httpbin.org/post",
"CreateTime": "2019-11-20T11:36:46.8062564Z",
"FormChargeResult": "Pending",
"Properties": {
"Language": "en",
"AutoDetectCardType": true,
"ShowCVV": true,
"Success": "https://yoursite.com/success?cardToken={cardToken}",
"Failure": "https://yoursite.com/failure"
}
}
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.
Hosted Card Entry Form Guide
API session approach for embedded card capture
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
| none | 401 | Missing or invalid API key in the Authorization header. The response body is empty. |
| N/A | 403 | The session belongs to a different user than the authenticated API key. |
| N/A | 404 | Card entry form session with the specified RequestID was not found. |
Parameters
Authentication
API key only. This endpoint does not accept access tokens or session tokens.string
required
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
string
required
The request ID returned from Create Card Entry Form session.
const requestID = 'ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV';
const response = await fetch(
`https://service.pcibooking.net/api/capturecard/${requestID}`,
{
headers: {
'Authorization': 'APIKEY your-api-key'
}
}
);
const data = await response.json();
console.log('Session is open, created at', data.CreateTime);
console.log('Request ID:', data.RequestID);
import requests
request_id = 'ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV'
response = requests.get(
f'https://service.pcibooking.net/api/capturecard/{request_id}',
headers={
'Authorization': 'APIKEY your-api-key'
}
)
data = response.json()
print('Session is open, created at', data['CreateTime'])
print('Request ID:', data['RequestID'])
Response
200 Returns the session configuration while the session is still open. The response includes the fields from Create Card Entry Form Session. A session is deleted when a card is stored or when itsTTL passes, so a session that returns 200 has not stored a card yet. To learn the outcome, use the callback.
The response also contains a FormChargeResult field. It does not apply to card entry sessions: it is always Pending and you can ignore it.
404 - Session not found: it never existed, a card was already stored, or it expired.
{
"RequestID": "ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV",
"SenderId": "RoeeSandbox",
"CreatorReference": "Card capture request",
"TTL": 600,
"CallBackURL": "http://httpbin.org/post",
"CreateTime": "2019-11-20T11:36:46.8062564Z",
"FormChargeResult": "Pending",
"Properties": {
"Language": "en",
"AutoDetectCardType": true,
"ShowCVV": true,
"Success": "https://yoursite.com/success?cardToken={cardToken}",
"Failure": "https://yoursite.com/failure"
}
}
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.

