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

# Validate

> ### DESCRIPTION ###
***Supported Payment Methods***
- `Credit Card`
- `Cloud EMV`
- `ACH`



## OpenAPI

````yaml https://cdn.ecrypt.dev/swagger/gateway-swagger-v25.json post /v1/transactions/validate
openapi: 3.0.4
info:
  title: Ecrypt.Gateway.Api
  description: Ecrypt API
  contact:
    name: Ecrypt
    url: https://www.ecrypt.com/
    email: Engineering@Ecrypt.com
  version: 1.0.0.0
servers: []
security: []
paths:
  /v1/transactions/validate:
    post:
      tags:
        - Transactions
      summary: Validate
      description: "### DESCRIPTION ###\r\n***Supported Payment Methods***\r\n- `Credit Card`\r\n- `Cloud EMV`\r\n- `ACH`"
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.Validate.TransactionValidateRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.Validate.TransactionValidateRequest
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.Validate.TransactionValidateRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.TransactionResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.BadRequest'
        '429':
          description: Too Many Requests
components:
  schemas:
    Ecrypt.Gateway.Api.Core.Model.Transactions.Validate.TransactionValidateRequest:
      required:
        - payment
      type: object
      properties:
        payment:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.Payment
        initiated_by_user_id:
          type: integer
          format: int64
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.Transactions.TransactionResponse:
      required:
        - requestId
      type: object
      properties:
        transaction_id:
          type: string
          nullable: true
        auth_code:
          type: string
          nullable: true
        response_code:
          type: string
          nullable: true
        response_text:
          type: string
          nullable: true
        latency:
          type: integer
          format: int32
        avs:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.AvsResponse
        cvv:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.CvvResponse
        amount:
          type: number
          format: double
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
        request_id:
          maxLength: 100
          minLength: 1
          type: string
          default: '000000000000000000000'
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/Ecrypt.Gateway.Api.Core.Model.ResponseBaseError
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.BadRequest:
      required:
        - requestId
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.BadRequestError'
          nullable: true
        request_id:
          maxLength: 100
          minLength: 1
          type: string
          default: '000000000000000000000'
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.Transactions.Payment:
      type: object
      properties:
        token:
          maxLength: 64
          minLength: 8
          pattern: ^[0-9A-Za-z-]*$
          type: string
          description: "Token ID generated from the iframe or the tokens endpoint.\r\n\r\nExample: 00000000-0000-0000-0000-000000000000"
          nullable: true
        stored:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.Stored
        terminal:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Terminals.PaymentTerminal
        credit_card:
          $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.WebAPI.CreditCard'
        check:
          $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.Check'
        cash:
          type: boolean
          description: ''
          nullable: true
        credit_card_encrypted:
          type: string
          nullable: true
        google_pay_payment:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.WebAPI.GooglePaymentRequest
        apple_pay_payment:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.WebAPI.ApplePayPaymentRequest
        method:
          type: string
          nullable: true
          readOnly: true
      additionalProperties: false
      description: "Payment requires that you submit only one of the below options:\r\n- `Token`\r\n- `Stored`\r\n- `Terminal`\r\n- `Check`\r\n- `Cash`"
    Ecrypt.Gateway.Api.Core.Model.Transactions.AvsResponse:
      type: object
      properties:
        code:
          type: string
          nullable: true
        text:
          type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.Transactions.CvvResponse:
      type: object
      properties:
        code:
          type: string
          nullable: true
        text:
          type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.ResponseBaseError:
      type: object
      properties:
        type:
          type: string
          nullable: true
        message:
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.BadRequestError:
      type: object
      properties:
        type:
          type: string
          nullable: true
        message:
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.Transactions.Stored:
      type: object
      properties:
        customer:
          maxLength: 64
          minLength: 8
          pattern: ^[0-9A-Za-z-]*$
          type: string
          description: >-
            Ecrypt Customer Identifier, this will use the customers default
            payment method on file.  This can be found under Customer Vault/Api
            User Id
          nullable: true
        wallet:
          maxLength: 64
          minLength: 8
          pattern: ^[0-9A-Za-z-]*$
          type: string
          description: >-
            Ecrypt Customer Wallet Identifier, this will use the specified
            payment method.
          nullable: true
        initiated_by:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.INITIATED_BY
        initial:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Transactions.INITIAL
        installment:
          type: integer
          format: int32
          nullable: true
        initial_transaction_id:
          type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.Terminals.PaymentTerminal:
      required:
        - id
      type: object
      properties:
        id:
          maxLength: 64
          minLength: 8
          pattern: ^[0-9A-Za-z-]*$
          type: string
          description: "Payment Terminal Identifier, this can be found on your Ecrypt Dashboard under Setting/Device Management.\r\n\r\nExample: 00000000-0000-0000-0000-000000000000"
        external_identifier:
          type: string
          description: "Processor Terminal Identifier, this is used by the processor.\r\n\r\nINTERNAL USE ONLY"
          nullable: true
        prompt_tip:
          type: boolean
          description: >-
            Prompt for Tip will display tip at time of sale options.  If your
            account does not support tip at time of sale this option will be
            ignored.
          nullable: true
        tip_amounts:
          type: array
          items:
            type: number
            format: double
          description: "Tip amounts in dollar format.  Terminals can support 3 or 4 tip amounts depending on the terminal.  Any extra items will be ignored.  This is required if you set Prompt for Tip to true.\r\n\r\nExample: [28.23, 33.88, 37.65, 41.41]"
          nullable: true
        prompt_cvv:
          type: boolean
          description: >-
            Prompt for CVV/CVC will attempt to override the card verification
            requirement and force CVV/CVC input.
          nullable: true
        prompt_postal_code:
          type: boolean
          description: >-
            Prompt for Postal Code will allow the customer to enter their
            billing postal code.
          nullable: true
        prompt_amount_confirmation:
          type: boolean
          description: >-
            Prompt for Amount Confirmation will force the customer to approve
            the transaction amount.
          nullable: true
        prompt_signature:
          type: boolean
          description: >-
            Prompt for Signature will show the signature screen on compatible
            terminals.
          nullable: true
        key_card:
          type: boolean
          description: Prompt Key Card will allow you to manually enter the card details.
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.WebAPI.CreditCard:
      required:
        - accountNumber
        - expires
      type: object
      properties:
        name_on_card:
          pattern: ^[0-9A-Za-z `',;-]*$
          type: string
          description: Name as it appears on the credit card.
          default: John Doe
          nullable: true
        account_number:
          maxLength: 20
          minLength: 13
          pattern: ^[0-9]*$
          type: string
          description: Credit Card primary account number(PAN)
          default: '4111111111111111'
        expires:
          maxLength: 7
          minLength: 4
          pattern: ^[0-9 /]*$
          type: string
          description: "Credit Card Expiry\r\n\r\nFormat: MMYY\r\nExample: 0135 = January 2035"
          default: '0135'
        verification_value:
          pattern: ^[0-9]*$
          type: string
          description: 3 or 4 digit card verification value(CVV, CVC).
          default: '000'
          nullable: true
        postal_code:
          pattern: ^[0-9A-Za-z -]*$
          type: string
          description: Billing address postal code.
          default: '90210'
          nullable: true
        transaction_id:
          type: string
          description: >-
            Processor transaction id.  This is used for processors that support
            re-charge an existing transaction.  INTERNAL USE ONLY
          nullable: true
        cavv:
          type: string
          nullable: true
        eci:
          type: string
          nullable: true
        e_commerce_indicator:
          type: string
          nullable: true
        eci_raw:
          type: string
          nullable: true
        xid:
          type: string
          nullable: true
        aav:
          type: string
          nullable: true
        three_d_secure_version:
          type: string
          nullable: true
        directory_server_id:
          type: string
          nullable: true
        ucaf_collection_indicator:
          type: string
          nullable: true
        digital_payment_cryptogram:
          type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.Check:
      required:
        - accountNumber
        - routingNumber
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 0
          pattern: ^[0-9A-Za-z _\-\.,`'()@#!?\/\\:;|+=@%&]*$
          type: string
          description: "Name as it appears on the check.\r\n\r\nExample: John Doe"
          nullable: true
        account_number:
          maxLength: 20
          minLength: 7
          pattern: ^[0-9]*$
          type: string
          description: "Account Number as it appears on the check.\r\n\r\nExample: 123123123"
        routing_number:
          maxLength: 20
          minLength: 8
          pattern: ^[0-9]*$
          type: string
          description: "Routing Number as it appears on the check.\r\n\r\nExample: 123123123"
        check_number:
          maxLength: 8
          minLength: 0
          pattern: ^[0-9]*$
          type: string
          description: "Check Number\r\n\r\nExample: 100"
          nullable: true
        account_type:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.WebAPI.Enums.AccountType
        verification:
          $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.CheckVerification'
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.WebAPI.GooglePaymentRequest:
      type: object
      properties:
        signature:
          type: string
          nullable: true
        intermediate_signing_key:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.WebAPI.IntermediateSigningKey
        protocol_version:
          type: string
          nullable: true
        signed_message:
          type: string
          nullable: true
        postal_code:
          type: string
          nullable: true
        name_on_card:
          type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.WebAPI.ApplePayPaymentRequest:
      type: object
      properties:
        payment_data:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.WebAPI.ApplePayPaymentData
        payment_method:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.WebAPI.ApplePayPaymentMethod
        transaction_identifier:
          type: string
          nullable: true
        name_on_card:
          type: string
          nullable: true
        postal_code:
          type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.Transactions.INITIATED_BY:
      enum:
        - 0
        - 1
      type: integer
      description: "Initiated By\r\n\r\nExample: MERCHANT\r\n*** Supported Values ***\r\n- `MERCHANT`, recurring payments, installments, or other senarios where the merchant start then transaction\r\n- `CUSTOMER`, customer started the transaction"
      format: int32
    Ecrypt.Gateway.Api.Core.Model.Transactions.INITIAL:
      enum:
        - 0
        - 1
      type: integer
      description: "Initial Transaction type\r\n\r\nExample: RECURRING\r\n*** Supported Values ***\r\n- `[NULL]`, \r\n- `RECURRING`\r\n- `INSTALLMENT`"
      format: int32
    Ecrypt.Gateway.Api.Core.Model.WebAPI.Enums.AccountType:
      enum:
        - 0
        - 1
      type: integer
      description: "Type of account\r\n\r\nExample: CHECKING\r\n*** Supported Values ***\r\n- `CHECKING`\r\n- `SAVINGS`"
      format: int32
    Ecrypt.Gateway.Api.Core.Model.CheckVerification:
      type: object
      properties:
        dob:
          maxLength: 14
          minLength: 8
          pattern: ^[0-9A-Za-z _\-\.\/]*$
          type: string
          description: "Date of Birth\r\n\r\nFormat: MM/DD/YYYY\r\nExample: 01/17/2006 = January 17th 2006"
          nullable: true
        ssn:
          maxLength: 14
          minLength: 8
          pattern: ^[0-9A-Za-z _\-\.\/]*$
          type: string
          description: "Social Security Number\r\n\r\nFormat: DDD-DD-DDDD\r\nExample: 123-45-6789"
          nullable: true
        drivers_license:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.CheckVerificationDriversLicense
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.WebAPI.IntermediateSigningKey:
      type: object
      properties:
        signed_key:
          type: string
          nullable: true
        signatures:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.WebAPI.ApplePayPaymentData:
      type: object
      properties:
        data:
          type: string
          nullable: true
        signature:
          type: string
          nullable: true
        header:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.WebAPI.ApplePayPaymentHeader
        version:
          type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.WebAPI.ApplePayPaymentMethod:
      type: object
      properties:
        display_name:
          type: string
          nullable: true
        network:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.CheckVerificationDriversLicense:
      type: object
      properties:
        number:
          maxLength: 100
          minLength: 0
          pattern: ^[0-9A-Za-z _\-\.\/]*$
          type: string
          description: "Number\r\n\r\nExample: A123456789"
          nullable: true
        state:
          maxLength: 100
          minLength: 0
          pattern: ^[0-9A-Za-z _\-\.\/]*$
          type: string
          description: "State\r\n\r\nFormat: CC\r\nExample: CA = California"
          nullable: true
      additionalProperties: false
    Ecrypt.Gateway.Api.Core.Model.WebAPI.ApplePayPaymentHeader:
      type: object
      properties:
        ephemeral_public_key:
          type: string
          nullable: true
        public_key_hash:
          type: string
          nullable: true
        transaction_id:
          type: string
          nullable: true
      additionalProperties: false

````