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

# Validate Operation results

<RequestExample>
  ```javascript Node.js theme={null}
  const resultToken = 'eyJhbGciOiJIUzI1NiIs...'; // from client after payment

  const response = await fetch('https://api.orchestrasolutions.com/EWalletOperations/validateResults', {
    method: 'POST',
    headers: {
      'X-Api-Key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(resultToken)
  });

  const data = await response.json();

  if (data.clientSuccess) {
    console.log('Payment confirmed');
    if (data.upgChargeResults) {
      console.log('Reference:', data.upgChargeResults.gatewayReference);
    }
  } else {
    console.log('Payment failed:', data.clientErrorMessage);
  }
  ```

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

  result_token = 'eyJhbGciOiJIUzI1NiIs...'  # from client after payment

  response = requests.post(
      'https://api.orchestrasolutions.com/EWalletOperations/validateResults',
      headers={
          'X-Api-Key': 'YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      data=json.dumps(result_token)
  )

  data = response.json()

  if data.get('clientSuccess'):
      print('Payment confirmed')
      if data.get('upgChargeResults'):
          print('Reference:', data['upgChargeResults']['gatewayReference'])
  else:
      print('Payment failed:', data.get('clientErrorMessage'))
  ```
</RequestExample>

## Related

<Card title="Library Reference" icon="book" href="/guides/library/reference">
  Result parsing, data structures, and validation
</Card>


## OpenAPI

````yaml post /EWalletOperations/validateResults
openapi: 3.0.4
info:
  title: Orchestra API
  description: Code Version 1.0.11.6
  version: Prod
servers:
  - url: https://api.orchestrasolutions.com
security: []
tags:
  - name: AP2
    description: Test AP2 controller
  - name: EWalletOperations
    description: Card operations controller
  - name: MockCredentialProvider
    description: |-
      Mock Credential Provider controller implementing JSON-RPC 2.0 protocol
      Used for testing AP2 checkout flows
  - name: PaymentGatewayAccounts
    description: Payment Gateway Accounts
  - name: PaymentGateway
    description: Universal Payment Gateway
  - name: StringTokens
    description: Token management
  - name: Tools
    description: >-
      Card tools for BIN/IIN lookup, brand identification, Luhn validation, and
      card risk assessment
  - name: Utils
    description: Utils
paths:
  /EWalletOperations/validateResults:
    post:
      tags:
        - EWalletOperations
      summary: Validate Operation results
      operationId: ValidateResults
      requestBody:
        description: Operation results token
        content:
          application/json:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: Payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/eWallet.Models.EWalletResultData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/PayTools_Shared.Models.ValidationErrorMessage
        '401':
          description: Not authenticated
      security:
        - ApiKeyAuth: []
components:
  schemas:
    eWallet.Models.EWalletResultData:
      type: object
      properties:
        upgChargeResults:
          $ref: '#/components/schemas/Payments.OperationResult'
        directChargeResults:
          $ref: >-
            #/components/schemas/eWallet.Models.GenericResults1System.ObjectSystem.Private.CoreLibVersion8.0.0.0CultureneutralPublicKeyToken7cec85d7bea7798e
        tokenAndMaskedCardModel:
          $ref: '#/components/schemas/eWallet.Models.TokenAndMaskedCardModel'
        failedUpgChargeResults:
          type: array
          items:
            $ref: '#/components/schemas/Payments.OperationResult'
          nullable: true
      additionalProperties: false
    PayTools_Shared.Models.ValidationErrorMessage:
      type: object
      properties:
        fieldName:
          type: string
          description: Field name the error(s) are referring to
          nullable: true
        errors:
          type: array
          items:
            type: string
          description: List of errors
          nullable: true
      additionalProperties: false
      description: Model for display validation error messages
    Payments.OperationResult:
      type: object
      properties:
        authorizationCode:
          type: string
          nullable: true
        currency:
          $ref: '#/components/schemas/Payments.CurrencyCode'
        amount:
          type: number
          format: double
        operationType:
          $ref: '#/components/schemas/Payments.Operation'
        operationResultCode:
          $ref: '#/components/schemas/Payments.Result'
        operationResultDescription:
          type: string
          nullable: true
        customGatewayResponse:
          nullable: true
        gatewayName:
          type: string
          nullable: true
        gatewayReference:
          type: string
          nullable: true
        gatewayResultCode:
          type: string
          nullable: true
        gatewayResultDescription:
          type: string
          nullable: true
        gatewayResultSubCode:
          type: string
          nullable: true
        gatewayResultSubDescription:
          type: string
          nullable: true
        gatewayToken:
          nullable: true
      additionalProperties: false
    eWallet.Models.GenericResults1System.ObjectSystem.Private.CoreLibVersion8.0.0.0CultureneutralPublicKeyToken7cec85d7bea7798e:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
          nullable: true
        data:
          nullable: true
      additionalProperties: false
    eWallet.Models.TokenAndMaskedCardModel:
      type: object
      properties:
        bankCard:
          $ref: '#/components/schemas/Payments.BankCard'
        threeDS:
          $ref: '#/components/schemas/Payments.ThreeDS'
        errorMessage:
          type: string
          nullable: true
        token:
          type: string
          nullable: true
        tokenLocation:
          type: string
          nullable: true
      additionalProperties: false
    Payments.CurrencyCode:
      enum:
        - AFN
        - EUR
        - ALL
        - DZD
        - USD
        - AOA
        - XCD
        - ARS
        - AMD
        - AWG
        - AUD
        - AZN
        - BSD
        - BHD
        - BDT
        - BBD
        - BYR
        - BZD
        - XOF
        - BMD
        - BTN
        - INR
        - BOB
        - BOV
        - BAM
        - BWP
        - NOK
        - BRL
        - BND
        - BGN
        - BIF
        - KHR
        - XAF
        - CAD
        - CVE
        - KYD
        - CLF
        - CLP
        - CNY
        - COP
        - COU
        - KMF
        - CDF
        - NZD
        - CRC
        - HRK
        - CUC
        - CUP
        - ANG
        - CZK
        - DKK
        - DJF
        - DOP
        - EGP
        - SVC
        - ERN
        - ETB
        - FKP
        - FJD
        - XPF
        - GMD
        - GEL
        - GHS
        - GIP
        - GTQ
        - GBP
        - GNF
        - GYD
        - HTG
        - HNL
        - HKD
        - HUF
        - ISK
        - IDR
        - XDR
        - IRR
        - IQD
        - ILS
        - JMD
        - JPY
        - JOD
        - KZT
        - KES
        - KPW
        - KRW
        - KWD
        - KGS
        - LAK
        - LBP
        - LSL
        - ZAR
        - LRD
        - LYD
        - CHF
        - LTL
        - MOP
        - MKD
        - MGA
        - MWK
        - MYR
        - MVR
        - MRO
        - MUR
        - XUA
        - MXN
        - MXV
        - MDL
        - MNT
        - MAD
        - MZN
        - MMK
        - NAD
        - NPR
        - NIO
        - NGN
        - OMR
        - PKR
        - PAB
        - PGK
        - PYG
        - PEN
        - PHP
        - PLN
        - QAR
        - RON
        - RUB
        - RWF
        - SHP
        - WST
        - STD
        - SAR
        - RSD
        - SCR
        - SLL
        - SGD
        - XSU
        - SBD
        - SOS
        - SSP
        - LKR
        - SDG
        - SRD
        - SZL
        - SEK
        - CHE
        - CHW
        - SYP
        - TWD
        - TJS
        - TZS
        - THB
        - TOP
        - TTD
        - TND
        - TRY
        - TMT
        - UGX
        - UAH
        - AED
        - USN
        - UYI
        - UYU
        - UZS
        - VUV
        - VEF
        - VND
        - YER
        - ZMW
        - ZWL
        - XBA
        - XBB
        - XBC
        - XBD
        - XTS
        - XXX
        - XAU
        - XPD
        - XPT
        - XAG
      type: string
    Payments.Operation:
      enum:
        - Charge
        - PreAuth
        - Capture
        - Void
        - Refund
        - Tokenize
        - Status
      type: string
    Payments.Result:
      enum:
        - Success
        - Accepted
        - Rejected
        - TemporaryFailure
        - FatalFailure
        - NotImplemented
      type: string
    Payments.BankCard:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/Payments.CardTypes'
        nameOnCard:
          type: string
          nullable: true
        issueNumber:
          maxLength: 2
          type: string
          nullable: true
        ownerId:
          type: string
          nullable: true
        securityCode:
          type: string
          nullable: true
        number:
          type: string
          nullable: true
        expirationMonth:
          type: integer
          format: int32
        expirationYear:
          type: integer
          format: int32
      additionalProperties: false
    Payments.ThreeDS:
      type: object
      properties:
        authenticationValue:
          type: string
          nullable: true
        eci:
          type: string
          nullable: true
        xid:
          type: string
          nullable: true
        version:
          type: string
          nullable: true
        sli:
          type: string
          nullable: true
        acsTransactionId:
          type: string
          nullable: true
        universal_TransactionId:
          type: string
          nullable: true
      additionalProperties: false
    Payments.CardTypes:
      enum:
        - Unspecified
        - AMEX
        - BC
        - CartaSi
        - Dankort
        - Delta
        - DinersClub
        - Discover
        - Electron
        - Elo
        - enRoute
        - Hipercard
        - JCB
        - Maestro
        - MasterCard
        - MC_Alaska
        - MC_Canada
        - Switch
        - Troy
        - UATP
        - UnionPay
        - Visa
      type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Please enter ApiKey into field
      name: X-Api-Key
      in: header

````