> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pcibooking.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Card Entry Session Details

> Retrieve the parameters configured for a card form session.

<Card title="Hosted Card Entry Form Guide" icon="book" href="/capture-cards/hosted-card-entry-form#option-2-api-session">
  API session approach for embedded card capture
</Card>

Use this endpoint to retrieve the configuration and current status of a card entry form session. The response includes all the original session parameters along with the capture result, letting you check whether the cardholder has submitted the form and whether tokenization succeeded.

## Error Responses

| Code  | HTTP Status | Condition                                                               |
| ----- | ----------- | ----------------------------------------------------------------------- |
| -1003 | 401         | Missing or invalid API key in the `Authorization` header.               |
| 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

### Headers

<ParamField header="Authorization" type="string" required>
  Your API key prefixed with `APIKEY`. Example: `APIKEY your-api-key`. See the [Authentication guide](/getting-started/authentication).
</ParamField>

### Path Parameters

<ParamField path="RequestID" type="string" required>
  The request ID returned from [Create Card Entry Form session](/api-reference/tokenize-cards/create-card-entry-form-session).
</ParamField>

<RequestExample>
  ```javascript Node.js theme={null}
  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('Status:', data.FormChargeResult);
  console.log('Request ID:', data.RequestID);
  ```

  ```python Python theme={null}
  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('Status:', data['FormChargeResult'])
  print('Request ID:', data['RequestID'])
  ```
</RequestExample>

## Response

**200**

Returns the session configuration and its current status. The response includes all the fields from [Create Card Entry Form Session](/api-reference/tokenize-cards/create-card-entry-form-session), plus status fields that reflect what happened after the form was presented to the cardholder.

<ParamField body="FormChargeResult" type="string">
  The current status of the session. Possible values:

  | Value     | Meaning                                                          |
  | --------- | ---------------------------------------------------------------- |
  | `Pending` | Initial state. The cardholder has not yet submitted the form.    |
  | `Success` | Card was captured and tokenized successfully.                    |
  | `Reject`  | The card was rejected (e.g. failed validation or 3DS challenge). |
  | `Failure` | A technical error occurred during processing.                    |
</ParamField>

**404** - Session not found.

<ResponseExample>
  ```json 200 theme={null}
  {
    "RequestID": "ITGdnzZuR7hQOI583EUB8U9vC3aPjuoV",
    "SenderId": "RoeeSandbox",
    "CreatorReference": "Card capture request",
    "TTL": 600,
    "CallBackURL": "http://httpbin.org/post",
    "CreateTime": "2019-11-20T11:36:46.8062564Z",
    "FormChargeResult": "Success",
    "Properties": {
      "Language": "en",
      "AutoDetectCardType": true,
      "ShowCVV": true,
      "Success": "https://yoursite.com/success?cardToken={cardToken}",
      "Failure": "https://yoursite.com/failure"
    }
  }
  ```

  ```json 401 theme={null}
  {
      "code": -1003,
      "message": "Not authorized to access this resource",
      "moreInfo": "Bad or missing authorization data, expected APIKEY",
      "errorList": null
  }
  ```
</ResponseExample>
