> ## 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.

# Validate Operation Result

> Validate the data returned to the client after a Payments Library operation to ensure it was not altered.

<Card title="Payments Library Reference" icon="book" href="/payments-library/reference">
  Complete reference for Payments Library operations
</Card>

After a charge or tokenization operation completes, the client-side Payments Library returns a payment token to your callback function. Call this endpoint from your server to verify the token is authentic and has not been tampered with.

## Error Responses

| Code    | HTTP Status | Condition                                              |
| ------- | ----------- | ------------------------------------------------------ |
| `-1003` | `401`       | API key is missing or invalid.                         |
| `-125`  | `400`       | The results token is invalid or could not be verified. |

## 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>

### Request Body

<ParamField body="RAW_BODY" type="string" required>
  The payment token string received in the client-side callback function. Pass it as the raw request body.
</ParamField>

<RequestExample>
  ```javascript Node.js theme={null}
  const response = await fetch('https://service.pcibooking.net/api/eWalletOperation/validateResults', {
    method: 'POST',
    headers: {
      'Authorization': 'APIKEY your-api-key',
      'Content-Type': 'text/plain'
    },
    body: resultTokenFromClient
  });
  const data = await response.json();
  console.log(data.valid); // true if token is authentic
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://service.pcibooking.net/api/eWalletOperation/validateResults',
      headers={
          'Authorization': 'APIKEY your-api-key',
          'Content-Type': 'text/plain'
      },
      data=result_token_from_client
  )
  data = response.json()
  print(data['valid'])  # True if token is authentic
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 theme={null}
  {
      "valid": true
  }
  ```

  ```json 400 theme={null}
  {
      "code": -125,
      "message": "Bad input data",
      "moreInfo": "...",
      "errorList": null
  }
  ```
</ResponseExample>
