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

# Post test authorization to given card

> This operation will create an authorization for given cardId without notification sending. Only available in DEMO environment.



## OpenAPI

````yaml transaction post /test-api/authorization/card/{cardId}
openapi: 3.0.3
info:
  description: |
    Endpoints for managing transaction data
  version: '1'
  title: Transaction details API
  contact:
    name: Enfuce Financial Services
    url: https://enfuce.com
    email: info@enfuce.com
  x-logo:
    url: https://developer.enfuce.com/images/enfuce.svg
    altText: Enfuce logo
servers:
  - url: >-
      https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/transaction
  - url: https://integration-api-cat2.live.ext.prod.cia.enfuce.com/transaction
    description: Live environment
security: []
tags:
  - name: Create transactions
    description: >-
      <p>Endpoints for creating transactions</p><h2>Generic Fee Reimbursement
      transaction types</h2><p>For this case reimbursement is not linked to
      specific charged fee and amount of reimbursement should be provided.
      Generic reimbursement transaction types can be used to reimburse one or
      several fees.</p><p>There is a possibility to create reimbursement on
      account or on card level.</p><p>To create reimbursement on account level
      please POST transaction to given account with &quot;AR&quot; as type
      parameter.</p><p>To create reimbursement on card level please POST
      transaction to given card with &quot;RR&quot; as type parameter.</p><p>On
      account level there also supported interest reimbursement transactions
      with “IR” and “OR” types.</p>
  - name: Create fees
    description: <p>Endpoints for creating fees</p>
  - name: Get transaction data
    description: Endpoints for fetching transaction data
  - name: Update a transaction
    description: >-
      <p>Endpoint for updating a transaction.</p><p>This service enables refund
      of transactions including fees.</p><h2>Reversal of previously posted
      transaction</h2><p>This use case allows to link reimbursement with
      previously posted transaction, including fees.</p><p>To create this type
      of refund please use POST &quot;Update a Transaction&quot; endpoint and as
      &quot;id&quot; parameter please provide id of the transaction which should
      be reversed, and in &quot;propertyToUpdate&quot; please provide
      &quot;REVERSE&quot; value. Id can be found with &quot;Get
      transaction&quot; endpoints under &quot;id&quot; parameter of
      transaction.</p>
  - name: Batch payment
    description: |
      Batch file for payments.
      ### File name standard
      `payment_{institution_id}_yyyymmdd_hhmmss.json`
      ### File structure
      <SchemaDefinition schemaRef="#/components/schemas/BatchPayments" />
      ### Response file
  - name: Authorization Holds
    description: Endpoints for creating, reversing and clearing of authorization holds
paths:
  /test-api/authorization/card/{cardId}:
    post:
      tags:
        - Test authorizations
      summary: Post test authorization to given card
      description: >-
        This operation will create an authorization for given cardId without
        notification sending. Only available in DEMO environment.
      operationId: postTestAuthorizationsUsingPOST
      parameters:
        - name: cardId
          in: path
          description: The card id to post test authorization to
          required: true
          schema:
            type: string
            format: biginteger
        - name: auditUser
          in: query
          description: The audit user to log the request
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/createTestTransactionResourceBody'
      responses:
        '201':
          description: Successful creation of the product
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resourceResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '500':
          description: API is having problems
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
      deprecated: false
components:
  requestBodies:
    createTestTransactionResourceBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/createTestTransactionResourceBody'
      description: Test transaction payload
      required: true
  schemas:
    resourceResponse:
      type: object
      properties:
        description:
          type: string
          description: Short description of the result of the action
        id:
          type: string
          description: Will contain the ID of the resource that has been created or updated
      title: resourceResponse
    errorResponse:
      type: object
      properties:
        code:
          type: string
          description: An error code indicating what kind of error. I.e. HTTP error code
        message:
          type: string
          description: Error message in human-readable format
        id:
          type: string
          format: uuid
          description: Unique error identifier
        errorCode:
          type: string
          description: Enfuce code for a specific error type
        errorType:
          type: string
          description: Error type
          enum:
            - STATIC_VALIDATION_ERROR
            - DYNAMIC_VALIDATION_ERROR
            - INTEGRATION_ERROR
            - SECURITY_ERROR
            - UNEXPECTED_ERROR
        errorReason:
          type: string
          description: Free-form text explaining the error reason
        timestamp:
          type: string
          format: date-time
          description: Datetime when error occurred
    createTestTransactionResourceBody:
      title: createTestTransactionResourceBody
      type: object
      required:
        - settlementAmount
        - sicCode
        - transactionAmount
        - transactionCurrency
        - transactionCountry
        - transactionType
        - transactionCity
        - transactionDetails
      properties:
        settlementAmount:
          type: number
          description: Settlement amount
          example: 3.14
        sicCode:
          type: string
          pattern: ^[0-9]{4}$
          description: >
            Standard Industrial Classification code (4 digit), any number works
            for testing.


            examples:

            5542 = Automated Fuel Dispenser,

            5411 = Grocery Stores,supermarkets,

            5969 = Direct Marketing-Other Dire,

            5734 = Computer Software Stores,

            5499 = Miscellaneous Food Stores

            5812 = Eating Places,Restaurants

            5541 = Service Stations

            5814 = Fast Food Res.

            5999 = Miscellaneous & specialty

            7995 = Casino

            7273 = Dating Services
        transactionAmount:
          type: number
          description: Transaction amount
          example: 3.14
        transactionCurrency:
          $ref: '#/components/schemas/currency'
        transactionDate:
          type: string
          format: date-time
          example: '2019-01-28T00:00:00'
          description: >
            The local date (and time) when the transaction was made, i.e. the
            date/time in the time zone of the payment terminal/merchant.
            Date-time format YYYY-MM-DDThh:mm:ss. Please note that the
            authorisation and clearing formats used by card schemes do not
            support conveying the time zone in which the transaction was made
            and may only include the date with no specific time. Enfuce relays
            the date and time as received from the card schemes. 

            If not passed it's defaulted to current date-time.
        transactionCountry:
          $ref: '#/components/schemas/country'
        transactionType:
          type: string
          enum:
            - RETAIL
            - CASH
            - ATM
            - CREDIT
            - UNIQUE
            - CHPAYMENT
            - CHDEBIT
        transactionCity:
          type: string
          description: Transaction city
          maxLength: 32
        transactionDetails:
          type: string
          description: Merchant name
          maxLength: 255
        merchantId:
          type: string
          description: Merchant Id
          maxLength: 32
        authCode:
          type: string
          description: Auth code
          maxLength: 32
        sourceNumber:
          type: string
          description: Source number
          default: 9999999
          maxLength: 32
        retRefCode:
          type: string
          description: Ret ref code
          default: 9999999
          maxLength: 12
    currency:
      type: string
      description: A valid ISO 4217 currency code
      pattern: '[A-Z]{3}'
      example: EUR
    country:
      type: string
      description: >-
        A valid ISO 3166-1 alpha-3 country code, except for QZZ (UNMIK in
        Kosovo) and ROM for Romania.
      pattern: '[A-Z]{3}'
      example: FIN

````