openapi: 3.0.0
info:
  version: v1
  title: ACH Payments API
  description: >
                The Automated Clearing House (ACH) Payments API allows the consumer to initiate an ACH credit transaction to a creditor or beneficiary, initiate an ACH debit transaction to collect from a debtor or payer, check an ACH Credit or ACH Debit transaction status using a payment identification.


servers:
  # Added by API Auto Mocking Plugin
  - description: SwaggerHub API Auto Mocking
    url: https://virtserver.swaggerhub.com/apipeople/ach-payments-api/v1
  - description: Workato Fortis
    url: https://apim.workato.com/fortispb-dev/ach/api/v1

  
tags:
  - name: APIs
    description: A set of APIs to initiate ACH Credits and ACH Debits payments,retrieve the status on them, and retrieve ACH Companies.

  - name: Webhooks
    description: Webhook Service enables your backend applications to receive near real-time notifications when events occur in our systems. This allows you to take automated actions and eliminates unnecessary API polling calls.

paths:
  /payments/credits:
    post:
      summary: 'Create a Credit ACH Payment'
      description: |
              This API initiates a single ACH Credit to push funds from a given Fortis Bank ACH Company ID associated to a Fortis Bank financial account, to another given financial account.
                   
              :::warning Fortis Bank Account
              The debtor must be a Fortis Bank financial account.
              :::     
                   
              :::info Customer Reference
              To track ACH transactions effectively, please use a unique Customer Reference for each transaction. This helps identify the specific transaction during inquiries and events.
              :::
                   
      operationId: 'postCreditPayment'
      parameters:
        - name: x-correlation-id
          in: header
          required: true
          description: A UUID value compliant with RFC 4122 used to identify an API Request. The value is echoed back in the response header. See [Authentication](/api/authentication/#correlation-id) for more details.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/creditTransferBody'
      responses:
        '201':
          description: Succesful ACH Operation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transferResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '409':
          description: |
                    The API was unable to process the request due to business validation rules.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 409
                              reason:  
                                example: "CONFLICT"
                              details:  
                                example: "ACH 60 days Limit Reached"
                                enum:
                                  - "ACH Daily Limit Reached"
                                  - "ACH 60 days Limit Reached"
                                  - "Credit Operation Not Allowed"
                                  - "Insufficient Funds to perform Credit"
                                
        '500':
          description: API Internal Error.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 500
                              reason:  
                                example: "INTERNAL_SERVER_ERROR"
                              details:  
                                example: "Recipe function call failed (id: 61178786, job_id: j-AT6HQhcH-YGmr8a): Bank Routing Number is not valid at line: 19092"
      security:
        - oAuth2_ClientCredentials: []
      tags:
        - APIs
  /payments/debits:
    post:
      summary: 'Create a Debit ACH Payment'
      description: >
        This API initiates a single ACH Debit to pull funds from a given financial account to a Fortis Bank ACH Company Id associated to a Fortis Bank financial account. 
        
          :::warning Fortis Bank Account
          The debtor must be a Fortis Bank financial account.
          :::     
                   
          :::info Customer Reference
          To track ACH transactions effectively, please use a unique `customerReference` for each transaction. This helps identify the specific transaction during inquiries and events.
          :::
          
      operationId: 'postDebitPayment'
      parameters:
        - name: x-correlation-id
          in: header
          required: true
          description: A UUID value compliant with RFC 4122 used to identify an API Request. The value is echoed back in the response header. See [Authentication](/api/authentication/#correlation-id) for more details.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/debitTransferBody'
      responses:
        '201':
          description: ACH Operation Created Successfully Response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transferResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '409':
          description: |
                    API was unable to process the request due to issues with the ACH Company provided.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 409
                              reason:  
                                example: "CONFLICT"
                              details:  
                                example: "ACH 60 days Limit Reached"
                                enum:
                                  - "ACH Daily Limit Reached"
                                  - "ACH 60 days Limit Reached"
                                  - "Debit is not allowed"                                
        '500':
          description: API Internal Error.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 500
                              reason:  
                                example: "INTERNAL_SERVER_ERROR"
                              details:  
                                example: "Recipe function call failed (id: 61178786, job_id: j-AT6HQhcH-YGmr8a): Bank Routing Number is not valid at line: 19092"
      security:
        - oAuth2_ClientCredentials: []
      tags:
        - APIs

  /payments/{paymentId}:
    get:
      summary: 'Retrieve an ACH Payment Information'
      description: This API retrieves the all the information (including status) of submitted ACH Payment using its `paymentId`. 
      operationId: 'getPaymentInfo'
      parameters:
        - name: paymentId
          in: path
          required: true
          description: Payment ID generated when creating the ACH Transfer.
          example: 1998237737364728
          schema:
            type: string
        - name: x-correlation-id
          in: header
          required: true
          description: |
            A UUID value compliant with RFC 4122 used to identify an API Request. The value is echoed back in the response header. See [Authentication](/api/authentication/#correlation-id) for more details.
          schema:
            type: string
      responses:
        '200':
          description: Successful ACH Retrieval Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentRetrieveResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '409':
          description: |
                    API was unable to process the request due to issues with the ACH Company provided.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 409
                              reason:  
                                example: "CONFLICT"
                              details:  
                                example: "ACH 60 days Limit Reached"
        '500':
          description: API Internal Error.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 500
                              reason:  
                                example: "INTERNAL_SERVER_ERROR"
                              details:  
                                example: "Recipe function call failed (id: 61178786, job_id: j-AT6HQhcH-YGmr8a): Bank Routing Number is not valid at line: 19092"
      security:
        - oAuth2_ClientCredentials: []
      tags:
        - APIs
  /ach-companies:
    get:
      summary: 'Retrieve ACH Companies'
      operationId: 'getAchCompanies'
      description: |
        This API retrieves ACH Companies based on several params. 
          :::info Account Type
          This API will assume the `accountType` is a Deposit account if not provided.
          :::
      
      parameters:
        - name: accountId
          in: query
          required: true
          schema:
            type: string
          description: The unique core identifier for the financial account.
        - name: accountType
          in: query
          required: false
          schema:
            type: string
          description: | 
            The single letter identifier for the financial account type.
             - `D` = Deposit
             - `S` = Savings
            If not informed, the default value is `D`.
            
      responses:
        '200':
          description: Successful ACH Companies Retrieval Response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    description: ACH Companies Retrieval results.
                    items:
                      type: object
                      properties:
                        name:
                          description: ACH Company Name.
                          type: string 
                          example: 'Company ABC'
                          maxLength: 16
                        id:
                          description: ACH Company ID.
                          type: string 
                          example: '123456789'
                          maxLength: 10
                        standardEntryClass:
                          $ref: '#/components/schemas/secCodes'                          
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 404
                              reason:  
                                example: NOT_FOUND
                              details:  
                                example: No records could be found.  
        '500':
          description: API Internal Error.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 500
                              reason:  
                                example: "INTERNAL_SERVER_ERROR"
                              details:  
                                example: "Recipe function call failed (id: 61178786, job_id: j-AT6HQhcH-YGmr8a): Unknown at line: 19092"      
      security:
              - oAuth2_ClientCredentials: []
      tags:
        - APIs        
#
# Webhooks
#
  /your-webhook-url:
    post:
      operationId: WebhookEvent
      description: This is a representation of the HTTP webhook call that the consumer will receive for each ACH payment related event that occur. Please be aware (/your-webhook-url) will be the full FDNS consumer custom http endpoint that should be provided during API consumer onboarding.
      summary: Receive ACH Payment Event Webhooks 
      parameters: 
        - $ref: '#/components/parameters/xTimestamp'
        - $ref: '#/components/parameters/xSignature'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhookEvent'
      responses:
        '200':
          description: Notification is delivered. No additional retries are executed. 
      security:
        - basicAuth: []
      tags:
        - Webhooks      
  /payments/webhookEvents:
    get:
      summary: 'Retrieve All Events for a Given Period'
      description: This API allows the API consumer to retrieve past webhooks events on demand given a date period.
      operationId: getWebhookEvents
      parameters:
        - name: startDate
          in: query
          required: true
          description: Start date to retrieve events.
          example: '2025-04-03'
          schema:
            format: date
            pattern: /([0-9]{4})-(?:[0-9]{2})-([0-9]{2})/
            type: string
        - name: endDate
          in: query
          required: true
          description: End date to retrieve events.
          example: '2025-04-03'
          schema:
            pattern: /([0-9]{4})-(?:[0-9]{2})-([0-9]{2})/
            format: date
            type: string
        - $ref: "#/components/parameters/offset"
        - $ref: "#/components/parameters/limit" 
        - name: x-correlation-id
          in: header
          required: true
          description: A UUID value compliant with RFC 4122 used to identify an API Request. The value is echoed back in the response header. See [Authentication](/api/authentication/#correlation-id) for more details.
          schema:
            type: string
      responses:
        '200':
          description: Successful Webhooks Retrieval Response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      allOf:
                        - type: object
                          properties:
                            eventStatus:
                              type: string
                              description: "The ACH Event Status"
                              example: "DELIVERED"
                        - $ref: "#/components/schemas/webhookEvent"
                  pagination:
                    $ref: '#/components/schemas/paginationResponse'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 400
                              reason:  
                                example: BAD_REQUEST
                              details:  
                                example: Please verify input parameters.
        '401':
          $ref: '#/components/responses/401'
        '409':
          description: |
                    API was unable to process the request due to issues with the ACH Company provided. 
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 409
                              reason:  
                                example: "CONFLICT"
                              details:  
                                example: "ACH 60 days Limit Reached"
        '500':
          description: API Internal Error.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      errorDetails: 
                        allOf:
                          - $ref: '#/components/schemas/ErrorDetails'
                          - type: object
                            properties:                    
                              code:  
                                example: 500
                              reason:  
                                example: "INTERNAL_SERVER_ERROR"
                              details:  
                                example: "Recipe function call failed (id: 61178786, job_id: j-AT6HQhcH-YGmr8a): Bank Routing Number is not valid at line: 19092"
      security:
        - oAuth2_ClientCredentials: []
      tags:
        - Webhooks

components:
  securitySchemes:
    oAuth2_ClientCredentials:
      type: oauth2
      description: OAuth 2 [Client Credentials Flow](https://docs.workato.com/api-mgmt/oauth2.html#how-to-setup-oauth-2-0)
      flows: 
        clientCredentials: 
          tokenUrl: https://apim.workato.com/oauth2/token
          scopes: {} # Scopes not used in v1
    basicAuth:
      type: http
      scheme: basic
      
  responses:
    '400':
      description: Bad Request.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  errorDetails: 
                    allOf:
                      - $ref: '#/components/schemas/ErrorDetails'
                      - type: object
                        properties:                    
                          code:  
                            example: 400
                          reason:  
                            example: BAD_REQUEST
                          details:  
                            example: Please verify input parameters.
    '401':
      description: |
        Unauthorized.

          :::info 401 errors
          There are two different error schemas for 401 errors, one when the API credentials sent are wrong or invalid and another one when the API credentials are valid but the operation is prohibited for the consumer.
          :::

      content:
        application/json:
          schema:
            oneOf:
              - allOf:
                - $ref: '#/components/schemas/Error'
                - type: object
                  properties:
                    errorDetails: 
                      allOf:
                        - $ref: '#/components/schemas/ErrorDetails'
                        - type: object
                          properties:                    
                            code:  
                              example: 401
                            reason:  
                              example: UNAUTHORIZED
                            details:  
                              example: Permission denied.
              - type: object
                properties:
                  error: 
                    type: string
                    example: Access to this API has been disallowed            
    '500':
      description: API Internal Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
            
  parameters:
    xCorrelationId:
      name: x-correlation-id
      in: header
      required: true
      description: A UUID value compliant with RFC 4122 used to identify an API Request. The value is echoed back in the response header. See [Authentication](/api/authentication/#correlation-id) for more details.
      schema:
        type: string
        minLength: 36
        maxLength: 36
    xTimestamp:
      name: x-timestamp
      in: header
      required: true
      description: |
        The timestamp used to support the message signature. Should contain only numbers.
        :::warning  Rejected Timestamps
        Requests with timestamp > 5min will be rejected
        :::
      schema:
        type: string
        example: "1746197323"
    xSignature:
      name: x-signature
      in: header
      required: true
      description: |
        Payload signature used by the API Client to validate message authenticity. Signature is calculated via **HMAC SHA256** algorithm and is composed by: 
            -`HTTP_VERB + HTTP_URL + PAYLOAD + TIMESTAMP`.
        The key will be provided to API Consumer
      schema:
        type: string
        minLength: 64
        maxLength: 64

  #############################
  # API Pagination Parameters #
  #############################
    limit:
      name: limit
      in: query
      required: false            
      description: The maximum number of records to return in each response.  
      example: 1007769
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 100
    offset:
      name: offset
      in: query
      required: false            
      description: Allows the call to understand where the previous call left off when returning multiple records and allowing a subsequent call to retrieve more records.
      example: ZkiT8ovgDb5NbZ7XvkwTYwwm1vgUDn1vEswIQT4ThOBY4qv5Xnp1oKS1e05Gas4AAfP8bH_w-Tl8VMAggvqkLlTjnnJ3PRl-79BDsg 
      schema:
        type: string
        example: ZkiT8ovgDb5NbZ7XvkwTYwwm1vgUDn1vEswIQT4ThOBY4qv5Xnp1oKS1e05Gas4AAfP8bH_w-Tl8VMAggvqkLlTjnnJ3PRl-79BDsg   

########################
## Schemas of Objects
########################
  schemas:
  
    webhookEvent:
      type: object
      properties:
        notificationId:
          type: string
          minLength: 36
          maxLength: 36
          description: UUID of the generated event
          example: "8cefee42-cb39-4479-b7fd-b8a358aeb002"
        eventType:
          type: string
          description: The webhook event type
          example: "ach.status"
          enum: 
            - ach.status
        eventDateTime:
          type: string
          format: date-time
          description: The date the event occurred
          example: "2017-07-21T17:32:28Z"
        data:
          type: object
          properties:
            achEventInfo:
              $ref: '#/components/schemas/paymentRetrieveResponse'  
  
  
    creditTransferBody:
      description: JSON Payload for Credit Request.
      type: object
      properties:
        paymentKey:
          description: Unique identifier for this ACH transfer containing only numbers. If none is provided, a system-generated key will be assigned. If this is sent and the ACH operation fails at core level, the same `paymentkey` could be reused.
          type: string
          example: 1998237737364728
          pattern: ^[\d]{1,16}$
          maxLength: 16
        amount:
          maxLength: 12
          minLength: 1
          type: string
          pattern: ^[\d]*\.[\d]{2}$
          example: "1.00"
          description: >-
            Transaction amount in `N.NN` format. For amounts less than 1 Dollar, the 0 is required (0.50).
        standardEntryClass:
          $ref: '#/components/schemas/secCodes'
        customerReference:
          type: string
          maxLength: 10
          description: |
            The Customer Reference.
          example: 'Invoice'
        preNote:
          type: boolean
          description: |
            - `true` if transaction Pre-Note must be processed via EDI only. 
            - Defaults to `false` if nothing is provided
          example: false
          default: false
        debtor:
          $ref: '#/components/schemas/debtorInfo'
        creditor:
          $ref: '#/components/schemas/creditorInfo'
      required:
        - amount
        - standardEntryClass
        - debtor
        - creditor
        - customerReference
    debitTransferBody:
      description: JSON Payload for Debit Transfer Request.
      type: object
      properties:
        paymentKey:
          description: Unique identifier for this ACH transfer containing only numbers. If none is provided, a system-generated key will be assigned. If this is sent and the ACH operation fails at core level, the same `paymentkey` could be reused.
          type: string
          example: 1998237737364728
          pattern: ^[\d]{1,16}$
          maxLength: 16
        amount:
          maxLength: 12
          minLength: 1
          type: string
          pattern: ^[\d]*\.[\d]{2}$
          example: "1.00"
          description: >-
            Transaction amount in `N.NN` format. For amounts less than 1 Dollar, the 0 is required (0.50).
        standardEntryClass:
          $ref: '#/components/schemas/secCodes'
        customerReference:
          type: string
          maxLength: 10
          description: The customer Reference.
          example: 'Payment Request'
        preNote:
          type: boolean
          description: |
            - `true` if transaction Pre-Note must be processed via EDI only. 
            - Defaults to `false` if nothing is provided
          example: false
        creditor:
          $ref: '#/components/schemas/creditorAchCompanyInfo'
        debtor:
          $ref: '#/components/schemas/debtorBankInfo'
      required:
        - standardEntryClass
        - originator
        - receivingAccount
        - amount
        - customerReference
    creditorInfo:
      description: The financial account used as the receiver of the credit funds.
      type: object
      required:
        - financialInstitution
        - account
      properties:
        financialInstitution:
          type: string
          maxLength: 9
          minLength: 9
          example: "011001276"
          description: The financial institution routing number of the financial account receiving the funds.
        account:
          type: object
          description: The financial account used as the receiver of the credit funds.
          required:
            - id
            - type
          properties:
            id:
              type: string
              example: "10057"
              maxLength: 35
              description: Account Identifier
            type:
              $ref: '#/components/schemas/accountTypes'
    debtorBankInfo:
      description: The ACH operation debtor information.
      type: object
      required:
        - financialInstitution
        - account
        - name
      properties:
        name:
          type: string
          maxLength: 22
          example: Acme Inc.
          description: Debtor name.          
        financialInstitution:
          type: string
          maxLength: 9
          minLength: 9
          example: "011001276"
          description: Financial Institution Routing Number
        account:
          type: object
          required:
            - id
            - type
          properties:
            id:
              type: string
              example: "10057"
              maxLength: 35
              description: Account Identifier
            type:
              $ref: '#/components/schemas/accountTypes'
    creditorAchCompanyInfo:
      description: The Fortis Financial Account where the funds will be received.
      type: object
      required:
        - achCompanyName
      properties:
        achCompanyId:
          maxLength: 10
          type: string
          example: 123456789
          description: The ACH Company Id tied to the financial account where the funds will be received.
        achCompanyName:
          maxLength: 16
          minLength: 1
          type: string
          example: ExampleCompanyACH
          description: The ACH Company Name tied to the financial account where the funds will be received.
          
    debtorInfo:
      description: The ACH operation debtor information.
      type: object
      required:
        - achCompanyName
        - achCompanyId
      properties:
        name:
          type: string
          maxLength: 22
          example: Acme Inc.
          description: The debtor name.
        achCompanyId:
          maxLength: 10
          type: string
          example: 123456789
          description: The ACH Company ID tied to the financial account where the funds will be sent from.
        achCompanyName:
          maxLength: 16
          minLength: 1
          type: string
          example: ExampleCompanyACH
          description: The ACH Company Name tied to the financial account where the funds will be sent from.
    secCodes:
      type: string
      minLength: 3
      maxLength: 3
      description: >
        Used to identify the ACH payment type. See [SEC Codes](/api/ach-payments/sec-codes) for more details and a complete list of available codes.     
      enum:
        - ACK
        - ADV
        - ARC
        - ATX
        - BOC
        - CCD
        - COR
        - CTX
        - DNE
        - ENR
        - IAT
        - MTE
        - POP
        - POS
        - PPD
        - RCK
        - SHR
        - TEL
        - TRC
        - TRX
        - WEB
        - XCK
    accountTypes:
      type: string
      example: "D"
      description: |
        The single letter identifier for the financial account type.
           - `D` = Deposit
           - `S` = Savings
          If not informed, the default value is `D`
      enum:
        - D
        - S
    transferResponse:
      type: object
      properties:
        paymentId:
          type: string
          description: Resulting ACH Operation ID that can be used to inquiry status.
          example: 1998237737364728
    paymentRetrieveResponse:
      type: object
      required:
        - transactionId
        - status
        - transactionType
        - standardEntryClass
        - preNote
        - amount
        - debtor
        - creditor
      properties:
        transactionId:
          type: string
          example: "327250000173"
          description: Unique identifier for the transaction.
        status:
          type: string
          example: "INITIATED"
          description: Status of the transaction.
          enum:
            - INITIATED
            - PROCESSED
            - NOTICE_OF_CHANGE
            - RETURN
        transactionType:
          type: string
          example: "CREDIT"
          description: Type of transaction.
          enum:
            - CREDIT
            - DEBIT
        standardEntryClass:
          $ref: '#/components/schemas/secCodes'
        transferDate:
          type: string
          format: date
          example: "2025-03-28"
          description: Date of the transfer.
        traceNumber:
          type: string
          example: "000000000000185"
          description: Trace number for the ACH transaction.
        preNote:
          type: boolean
          example: true
          description: 'True if transaction Pre Note must be processed via EDI only.'
        amount:
          type: string
          example: "1234.50"
          description: Amount of the transaction.
        debtor:
          $ref: '#/components/schemas/creditorDebitorReponse'
        creditor:
          $ref: '#/components/schemas/creditorDebitorReponse'
        returnNOC:
          type: object
          description: Information related to the Notification Of Change (NOC) or Return results coming back after an ACH transaction is submitted.
          properties:
            'type':
              type: string
              example: "NOC"
              description: Type of result, whether Notification Of Change (NOC) or Return.
              enum:
                - NOC
                - Return 
            reasonCode:
              type: string
              example: "C02"
              description: Return or NOC Reason Code.
            reasonDescription:
              type: string
              example: "Incorrect Routing Number"
              description: Return or NOC Reason Description.          
    creditorDebitorReponse:
      type: object
      properties:
        achCompanyId:
          type: string
          example: "123456789"
          description: Debtor's ACH company identifier.
        achCompanyName:
          type: string
          example: "ACH Company Name"
          description: Debtor's ACH company name.
        name:
          type: string
          example: "Debtor/Creditor Name"
          description: Debtor's company name.
        financialInstitution:
          type: string
          example: "011001276"
          description: Debtor's financial institution routing number.
        account:
          type: object
          required:
            - accountType
            - accountId
          properties:
            accountType:
              type: string
              example: "Deposit"
              description: Debtor's account type.
            accountId:
              type: string
              example: "100783"
              description: Debtor's account identifier.
  ##############################################
  # API Standard Pagination Response DataModel #
  ##############################################
    paginationResponse:
      type: object
      properties:
        moreResults:
          description: Indicates if there is more content that could be returned from a subsequent call.
          type: boolean
        offset:
          description: Allows the next call to understand where it left off when returning multiple records and allowing a subsequent call to retrieve more records.
          type: string
          example: ZkiT8ovgDb5NbZ7XvkwTYwwm1vgUDn1vEswIQT4ThOBY4qv5Xnp1oKS1e05Gas4AAfP8bH_w-Tl8VMAggvqkLlTjnnJ3PRl-79BDsg               
  ################################
  # API Standard Error DataModel #
  ################################
    Error:
      required:
      - apiName
      - version
      - correlationId
      - timestamp
      - errorDetails
      properties:
        apiName:
          type: string
          example: ACH Payments API
        version:
          type: string
          example: v1
        correlationId:
          type: string
          example: 679751e0-36ba-49a1-b992-599c75beec66
        timestamp:
          type: string
          example: "2025-06-05T10:12:43.642286-07:00"
        errorDetails:
          type: object
          properties:
            code:
              type: string
            reason:
              type: string
            details:
              type: string
    ErrorDetails:
      type: object
      properties:
        code:
          type: string
          description: HTTP standard error code.
        reason:
          type: string
          description: Integration error identification code.
        details:
          type: string
          description: Error description.