openapi: 3.0.0
info:
  title: Payments
  description: >
    The Payments API allows banking customers to submit instructions to pay people or businesses using one of several

    payment methods, such as wire transfers, bill payment, or person to person payment.

    The payment is drafted from an eligle account. This API does _not_ process or execute the payments.



    The API provides metadata which describes [each available payment method](#op-getPaymentMethods),

    its terms and conditions, whether the payment method supports scheduling payments in the future,

    or whether the user can edit or cancel submitted payment instructions.



    The customer can create payees and manage the payment method details of each payee,

    such as how to pay them via wire transfer and/or bill pay.

    Payees may be people or businesses (or other non-person entity).

    Use the [`createPayee` operation](#op-createPayee) to create a new payee.

    The customer owns their payees, which are not visible to other customers.

    However, the details of payment instructions, which includes some details of the payee,

    are visible to other account holders.



    The client can [create a payment instruction](#op-createPaymentInstruction).

    A payment instruction represents a user's request to make a payment.

    Payment instructions contain an existing payee or data for a new payee, and details of one payment method

    with which to pay that payee. The new payment instruction is in the `pending` state.

    the client application may [update the pending payment instruction](#op-updatePaymentInstruction)

    or [delete it](#op-deletePaymentInstruction).

    When ready, the client should [submit the payment instruction](#op-submitPaymentInstruction).

    (Payment instructions are not processed unless they are submitted.)

    The client may [cancel some submitted payment instruction](#op-cancelPaymentInstruction),

    before they are processed, although not all payment methods support canceling.


    The customer can view their pending, submitted, and processing [`getPaymentInstructions`](#op-getPaymentInstructions).

    Other account holders can also view payment instructions on the account.


    Finally, the customer can view their [payment history](#op-getHistory) - a list of

    completed or failed payments.


    ## Multi-factor authentication challenges


    Some payment methods, such as wire transfers, may require _multi-factor

    authentication_ (MFA) when [submitting payment instructions](#op-submitPaymentInstruction).

    An MFA challenge is a process to verify the user's identity through one or more

    additional authentication steps.



    If the client tries the operation without a valid redeemable

    `Apiture-Challenge` request header, the operation may fail with a 409 Conflict. The response body, defined

    by the [`challengeErrorResponse`](#schema-challengeErrorResponse) schema, contains a

    [`challenge`](#schema-challenge) resource which includes one or more

    [_authenticators_](#schema-authenticator). The client should start at least one of the authenticators,

    optionally allowing the user to choose which one to use, depending on how many authenticators are required.



    For example, the challenge may include an authenticator

    that sends a verification code to the user's mobile phone. The user completes the authentication by

    entering the code in the client application. Once the authentication step has completed successfully, the

    client must pass the resource ID of the challenge resource in the `Apiture-Challenge` request header in

    order to complete the operation. Thus, these operations require two

    tries: the first (without the `Apiture-Challenge` header), which fails with a 409 status but returns the

    [`challenge`](#schema-challenge) object, then after completing the challenges' authenticators, a second try, passing in the

    `Apiture-Challenge` header.


    ## Payment instruction processing


    After submitting, the financial institution may begin processing the payment instructions

    There may be some delay, from minutes to hours or days, depending on the payment method.


    The financial institution may [reject](#op-rejectPaymentInstruction) the payment instructions,

    for example, if the account has insufficient funds when the payment is processed, or

    if the account is locked or closed.



    The financial institution executes submitted payment instructions through other processes.

    The API supports two types of payment processing:

      1. Instantaneous (or "real time"), where the submitted
      payment is complete (the account has been debited) as soon as it is processed. For this case,
      the financial institution should invoke the
      [`completePaymentInstruction`](#op-completePaymentInstruction) operation
      on the submitted payment instruction. This may be the case with wire transfers.
      2. Batch, where the financial institution first
      [marks payment instruction as _processed_](#op-processPaymentInstruction).
      When the financial institution later gets confirmation that the payment has completed
      and the account has been debited, the financial institution should
      [mark the payment instruction as complete](#op-completePaymentInstruction).

    If the financial institution tries but is is unable to process or complete the payment instructions,

    it should invoke the [`failPaymentInstruction`](#op-failPaymentInstruction) operation.


    # Error Types


    Error responses in this API may have one of the `type` values described below.

    See [Errors](https://developer.apiture.com/docs/concepts/errors) for more information

    on error responses and error types.




    <h2 class='errorType' id="err-cannotChangePaymentMethodType">cannotChangePaymentMethodType</h2>


    **Description**: Once a payment instruction has been submitted, the payment method type is not mutable. <br>

    **Remediation**: Contact the financial institution to cancel the payment and submit a new payment instruction.



    <h2 class='errorType' id="err-cannotUpdateCompletedPaymentInstructions">cannotUpdateCompletedPaymentInstructions</h2>


    **Description**: Completed payment instructions are immutable. <br>

    **Remediation**: Only update pending requests or submitted requests that allow updates as per the payment method definition.



    <h2 class='errorType' id="err-challengeRefNotFound">challengeRefNotFound</h2>


    **Description**: There is no challence resource corresponding to the referenced challenge. <br>

    **Remediation**: Pass a reference to a valid challence resource.



    <h2 class='errorType' id="err-challengedAlreadyRedeemed">challengedAlreadyRedeemed</h2>


    **Description**: The challenge resource has already been redeemed. <br>

    **Remediation**: Use the most recently issued challenge.



    <h2 class='errorType' id="err-challengedExpired">challengedExpired</h2>


    **Description**: The challenge resource has expired. <br>

    **Remediation**: Use the most recently issued challenge and complete the authenticators before the challenge expires.



    <h2 class='errorType' id="err-invalidAccount">invalidAccount</h2>


    **Description**: The `apiture:account` link was missing, was not a valid URL, or refers to an account that is not eligible for debiting for
    payments. <br>

    **Remediation**: Pass the URL of an account that is suitable for payments.



    <h2 class='errorType' id="err-invalidAttachment">invalidAttachment</h2>


    **Description**: A file attachment URL is invalid, no such resource exists, the attachment content does not match the document type, or the
    attachment content is not an allowed. <br>

    **Remediation**: Pass a valid attachment document URL.



    <h2 class='errorType' id="err-missingApitureChallengeHeader">missingApitureChallengeHeader</h2>


    **Description**: The Apiture-Challenge request header is missing. <br>

    **Remediation**: Pass a reference to a valid challence resource in the Apiture-Challenge header.



    <h2 class='errorType' id="err-noSuchPayee">noSuchPayee</h2>


    **Description**: The payment instruction included a payee `_id` but no such payee exists. <br>

    **Remediation**: Update a payment instruction using an existing payee or a payee without `_id` to create a new payee.



    <h2 class='errorType' id="err-payeeMismatch">payeeMismatch</h2>


    **Description**: A payee with `type` of `person` must contain the `person` object and its required properties, and a payee with `type` of
    `organization` must contain the `organization` object and its required properties. Only one of the `person` and `organization` objects is allowed.
    <br>

    **Remediation**: Pass the required object corresponding to the payee's `type`.



    <h2 class='errorType' id="err-paymentMethodDisallowsUpdates">paymentMethodDisallowsUpdates</h2>


    **Description**: Updates to payment instructions are not allowed for requests using this payment method. <br>

    **Remediation**: Contact the financial institution to cancel the payment and submit a new payment instruction.



    <h2 class='errorType' id="err-paymentMethodMismatch">paymentMethodMismatch</h2>


    **Description**: The payment instruction does not include the corresponding payment details for the `paymentMethod.type`. <br>

    **Remediation**: Set the correct details in the request. For example if the `paymentMethod.type` is `wireTransfer`, the body must contain the
    `paymentMethod.wireTransfer` object.
  version: 0.2.0
  contact:
    name: Apiture
    url: 'https://developer.apiture.com'
    email: api@apiture.com
  termsOfService: 'https://developer.apiture.com/docs/Apiture-Open-API-License-Agreement.pdf'
servers:
  - url: 'https://api.devbank.apiture.com/payments'
tags:
  - name: Payees
    description: Payment Recipients
  - name: Payment Instructions
    description: Requests to Make a Payment
  - name: Payment Instruction Actions
    description: Actions on Payment Instructions
  - name: Payments
    description: Completed Payments
  - name: Payment Methods
    description: Methods of Making Payments
  - name: API
    description: The Payments API
paths:
  /paymentMethodDefinitions:
    get:
      summary: Return a collection of payment methods definition
      description: >-
        Return a collection of payment methods definitions. This is a small, fixed collection (one per
        [`paymentMethodType`](#schema-paymentMethodType)), so there is no pagination or filtering.
      operationId: getPaymentMethods
      tags:
        - Payment Methods
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentMethodDefinitions'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentMethodDefinitions'
      security:
        - apiKey: []
      parameters: []
  '/paymentMethods/{paymentMethodType}':
    parameters:
      - $ref: '#/components/parameters/paymentMethodTypePathParam'
    get:
      summary: Fetch a representation of this payment method
      description: 'Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this payment method resource.'
      operationId: getPaymentMethod
      tags:
        - Payment Methods
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentMethodDefinition'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentMethodDefinition'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payment method resource.
              schema:
                type: string
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404PaymentMethodDefinition'
      security:
        - apiKey: []
          accessToken:
            - banking/read
  /payees:
    get:
      summary: Return a collection of payees
      description: >-
        Return a [paginated](https://developer.apiture.com/docs/concepts/pagination) [sortable](https://developer.apiture.com/docs/concepts/sorting)
        [filterable](https://developer.apiture.com/docs/concepts/filtering) [searchable](https://developer.apiture.com/docs/concepts/searching)
        collection of payees. The [links](https://developer.apiture.com/docs/concepts/links) in the response include pagination links.
      operationId: getPayees
      tags:
        - Payees
      parameters:
        - name: type
          description: Filter the response to list only payees of this `type`.
          in: query
          schema:
            type: string
            x-apiture-enum: payeeType
            enum:
              - person
              - organization
            description: |-


              <strong><code>schema</code></strong> strings may have one of the following
              [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

              <table>
              <tr>
                <th>Value</th><th>Description</th>
              </tr>

              <tr>
                  <td><strong><code>person</code></strong></td><td>Person: The payee is a person.</td>
                  </tr>
              <tr>
                  <td><strong><code>organization</code></strong></td><td>Organization: The payee is an organization such as a business.</td>
                  </tr>
              </table>


              These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
              named `payeeType` in the response from the [`getLabels`](#op-getLabels) operation.
        - name: start
          in: query
          description: The zero-based index of the first payee item to include in this page. The default 0 denotes the beginning of the collection.
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          description: The maximum number of payee representations to return in this page.
          schema:
            type: integer
            format: int32
            default: 100
        - name: sortBy
          in: query
          schema:
            type: string
          description: >-
            Optional sort criteria. See [sort criteria format](https://developer.apiture.com/docs/concepts/sorting), such as `?sortBy=field1,-field2`.
            The default sort order is by type, then by name (organization name or person lastname, firstname, middle name).<br>This collection may be
            sorted by following properties:<br>&bullet; `createdAt`<br>&bullet; `name`<br>&bullet; `type`<br>&bullet; `state`
        - name: filter
          in: query
          description: >-
            Optional filter criteria. See [filtering](https://developer.apiture.com/docs/concepts/filtering).<br>This collection may be filtered by
            following properties and functions:<br>&bullet;  Property `state` using functions `eq`,  `ne`
          schema:
            type: string
        - $ref: '#/components/parameters/qQueryParam'
      x-apiture-traits:
        sortBy:
          - createdAt
          - name
          - type
          - state
        filters:
          state:
            filter:
              - eq
              - ne
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payees'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/payees'
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422'
      security:
        - apiKey: []
          accessToken:
            - banking/read
    post:
      summary: Create a new payee
      description: Create a new payee in the payees collection.
      operationId: createPayee
      tags:
        - Payees
      requestBody:
        description: The data necessary to create a new payee.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createPayee'
          application/hal+json:
            schema:
              $ref: '#/components/schemas/payee'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payee'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/payee'
          headers:
            Location:
              description: >-
                The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with
                *`scheme`*`://host`
              schema:
                type: string
                format: uri
            ETag:
              description: An entity tag which may be passed in the `If-Match` request header for *`PUT`* or *`PATCH`* operations which update the resource.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/400'
        '422':
          description: >-
            Bad Request. The request body or one or more of the query parameters was not well formed. The `_error` field in the response contains
            details about the request error.


            This error response may have one of the following `type` values:

            * [`payeeMismatch`](#err-payeeMismatch)

            * [`noSuchPayee`](#err-noSuchPayee)
          x-apiture-errors:
            - payeeMismatch
            - noSuchPayee
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
      security:
        - apiKey: []
          accessToken:
            - banking/write
      parameters: []
  '/payees/{payeeId}':
    parameters:
      - $ref: '#/components/parameters/payeeIdPathParam'
    get:
      summary: Fetch a representation of this payee
      description: 'Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this payee resource.'
      operationId: getPayee
      tags:
        - Payees
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payee'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/payee'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payee resource.
              schema:
                type: string
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404Payee'
      security:
        - apiKey: []
          accessToken:
            - banking/read
    put:
      summary: Update this payee
      description: >-
        Perform a complete replacement of this payee. Note that this operation may change the payee `type`, although only one of the `person` and
        `organization` objects is allowed. If `type` is `person`, the `person` object must be provided , and if `type` is `organization`, the
        `organization` object must be provided. Nested `_embedded` and `_links` are ignored if included.
      operationId: updatePayee
      tags:
        - Payees
      requestBody:
        description: A new payee
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/payee'
          application/hal+json:
            schema:
              $ref: '#/components/schemas/payee'
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payee'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/payee'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payee resource.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404Payee'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422'
      security:
        - apiKey: []
          accessToken:
            - banking/write
    patch:
      summary: Update this payee
      description: >-
        Perform a partial update of this payee. Fields which are omitted are not updated. See also the constraints in [`updatePayee`](#op-updatePayee)
        which also apply to this patch operation. Nested `_embedded` and `_links` are ignored if included.
      operationId: patchPayee
      tags:
        - Payees
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      requestBody:
        description: The new payee.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/payee'
          application/hal+json:
            schema:
              $ref: '#/components/schemas/payee'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payee'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/payee'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payee resource.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404Payee'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422'
      security:
        - apiKey: []
          accessToken:
            - banking/write
    delete:
      summary: Delete this payee resource
      description: Delete this payee resource and any resources that are owned by it.
      operationId: deletePayee
      tags:
        - Payees
      responses:
        '204':
          $ref: '#/components/responses/204Deleted'
      security:
        - apiKey: []
          accessToken:
            - banking/delete
      parameters: []
  '/payees/{payeeId}/paymentMethods/wireTransfer':
    parameters:
      - $ref: '#/components/parameters/payeeIdPathParam'
    get:
      summary: Fetch payee's wire transfer parameters
      description: Fetch the parameters for wire transfers for this payee.
      operationId: getPayeeWireTransferMethod
      tags:
        - Payment Methods
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payeeWireTransferMethod'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/payeeWireTransferMethod'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payee resource.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404Payee'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422'
      parameters: []
    put:
      summary: Update payee's wire transfer parameters
      description: Update the parameters for wire transfer payments for this payee.
      operationId: updatePayeeWireTransferMethod
      tags:
        - Payment Methods
      requestBody:
        description: The data necessary to create wire transfer instructions for this payee.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/payeeWireTransferMethod'
          application/hal+json:
            schema:
              $ref: '#/components/schemas/payeeWireTransferMethod'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payeeWireTransferMethod'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/payeeWireTransferMethod'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payee resource.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404Payee'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422'
      parameters: []
  /paymentInstructions:
    get:
      summary: Return a collection of payment instructions
      description: >-
        Return a [paginated](https://developer.apiture.com/docs/concepts/pagination) [sortable](https://developer.apiture.com/docs/concepts/sorting)
        [filterable](https://developer.apiture.com/docs/concepts/filtering) [searchable](https://developer.apiture.com/docs/concepts/searching)
        collection of payment instructions. The [links](https://developer.apiture.com/docs/concepts/links) in the response include pagination links.
      operationId: getPaymentInstructions
      tags:
        - Payment Instructions
      parameters:
        - name: type
          description: Filter the response to list only payments of this payment method `type`.
          in: query
          schema:
            type: string
            x-apiture-enum: paymentMethodType
            enum:
              - billPay
              - personToPerson
              - wireTransfer
            description: |-


              <strong><code>schema</code></strong> strings may have one of the following
              [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

              <table>
              <tr>
                <th>Value</th><th>Description</th>
              </tr>

              <tr>
                  <td><strong><code>wireTransfer</code></strong></td><td>Wire Transfer: High value funds transfers through Fedwire or international wire transfer networks.</td>
                  </tr>
              <tr>
                  <td><strong><code>billPay</code></strong></td><td>Bill Pay: Pay bills and make other payments through checks or similar electronic funds transfer.</td>
                  </tr>
              <tr>
                  <td><strong><code>personToPerson</code></strong></td><td>Person To Person: One-time payments to, or requests for payment from, a person via a person-to-person payment network.</td>
                  </tr>
              </table>


              These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
              named `paymentMethodType` in the response from the [`getLabels`](#op-getLabels) operation.
        - name: state
          description: Filter the response to list only payment instructions in this `state`.
          in: query
          style: pipeDelimited
          schema:
            type: array
            uniqueItems: true
            items:
              type: string
              x-apiture-enum: paymentInstructionState
              enum:
                - pending
                - submitted
                - canceled
                - processing
                - rejected
                - completed
              description: |-


                <strong><code>items</code></strong> strings may have one of the following
                [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

                <table>
                <tr>
                  <th>Value</th><th>Description</th>
                </tr>

                <tr>
                    <td><strong><code>pending</code></strong></td><td>Pending: A new payment instruction that has not been submitted.</td>
                    </tr>
                <tr>
                    <td><strong><code>submitted</code></strong></td><td>Submitted: A payment instruction that the user has submitted for processing.</td>
                    </tr>
                <tr>
                    <td><strong><code>canceled</code></strong></td><td>Canceled: A payment instruction that the user has canceled.</td>
                    </tr>
                <tr>
                    <td><strong><code>processing</code></strong></td><td>Processing: A payment instruction that the financial institution has processed but which is not yet complete.</td>
                    </tr>
                <tr>
                    <td><strong><code>rejected</code></strong></td><td>Rejected: A payment instruction that the financial institution has rejected.</td>
                    </tr>
                <tr>
                    <td><strong><code>completed</code></strong></td><td>Completed: A payment instruction that has completed and debited from the account.</td>
                    </tr>
                </table>


                These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
                named `paymentInstructionState` in the response from the [`getLabels`](#op-getLabels) operation.
        - name: account
          description: 'Filter the response to list only payment instructions for the specified accounts, identified by the `accountId`.'
          in: query
          style: pipeDelimited
          schema:
            type: array
            uniqueItems: true
            maxItems: 8
            items:
              type: string
        - name: start
          in: query
          description: The zero-based index of the first payment instruction item to include in this page. The default 0 denotes the beginning of the collection.
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          description: The maximum number of payment instruction representations to return in this page.
          schema:
            type: integer
            format: int32
            default: 100
        - name: sortBy
          in: query
          schema:
            type: string
          description: >-
            Optional sort criteria. See [sort criteria format](https://developer.apiture.com/docs/concepts/sorting), such as `?sortBy=field1,-field2`.
            The default sort order is by `createdAt` (descending).<br>This collection may be sorted by following properties:<br>&bullet;
            `createdAt`<br>&bullet; `type`<br>&bullet; `state`<br>&bullet; `payeeName`<br>&bullet; `amount.value`
        - name: filter
          in: query
          description: >-
            Optional filter criteria. See [filtering](https://developer.apiture.com/docs/concepts/filtering).<br>This collection may be filtered by
            following properties and functions:<br>&bullet;  Property `state` using functions `eq`,  `ne`,  `in`<br>&bullet;  Property `type` using
            functions `eq`,  `ne`,  `in`<br>&bullet;  Property `submittedAt` using functions `lt`,  `le`,  `gt`,  `ge`<br>&bullet;  Property
            `amount.value` using functions `lt`,  `le`,  `gt`,  `ge`,  `eq`,  `ne`<br>&bullet;  Property `account` using functions `eq`,  `ne`, 
            `in`<br>&bullet;  Property `createdAt` using functions `lt`,  `le`,  `gt`,  `ge`<br>&bullet;  Property `createdBy` using functions `eq`, 
            `in`<br>&bullet;  Property `payeeName` using functions `eq`,  `contains`
          schema:
            type: string
        - $ref: '#/components/parameters/qQueryParam'
      x-apiture-traits:
        sortBy:
          - createdAt
          - type
          - state
          - payeeName
          - amount.value
        filters:
          state:
            filter:
              - eq
              - ne
              - in
          type:
            filter:
              - eq
              - ne
              - in
          submittedAt:
            filter:
              - lt
              - le
              - gt
              - ge
          amount.value:
            filter:
              - lt
              - le
              - gt
              - ge
              - eq
              - ne
          account:
            filter:
              - eq
              - ne
              - in
          createdAt:
            filter:
              - lt
              - le
              - gt
              - ge
          createdBy:
            filter:
              - eq
              - in
          payeeName:
            filter:
              - eq
              - contains
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstructions'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstructions'
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422'
      security:
        - apiKey: []
          accessToken:
            - banking/read
    post:
      summary: Create a new payment instruction
      description: |-
        Create a new payment instruction.
        The new resource appears in the [payment instructions collection](#op-getPaymentInstructions).


        The request body includes the payment amount, the payee, the details of a payment method,
        and the `apiture:account` link of the account where the payment is debited.


        Upon creating the payment instruction, the service automatically writes the
        payee and payment method properties to the associated payee resource
        and its corresponding nested payment methods resource.
        This operation creates a new payee if the request body does not
        contain an `payee._id` (a refererence to an existing payee).


        The payment remains `pending` until submitted with the
        [`submitPaymentInstruction`](#op-submitPaymentInstruction).
        Pending payment instructions may be deleted via [`deletePaymentInstruction`](#op-deletePaymentInstruction).
      operationId: createPaymentInstruction
      tags:
        - Payment Instructions
      requestBody:
        description: The data necessary to create a new payment instruction.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createPaymentInstruction'
          application/hal+json:
            schema:
              $ref: '#/components/schemas/paymentInstruction'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            Location:
              description: >-
                The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with
                *`scheme`*`://host`
              schema:
                type: string
                format: uri
            ETag:
              description: An entity tag which may be passed in the `If-Match` request header for *`PUT`* or *`PATCH`* operations which update the resource.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422CreatePaymentInstruction'
      security:
        - apiKey: []
          accessToken:
            - banking/write
      parameters: []
  '/paymentInstructions/{paymentInstructionId}':
    parameters:
      - $ref: '#/components/parameters/paymentInstructionIdPathParam'
    get:
      summary: Fetch a representation of this payment instruction
      description: 'Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this payment instruction resource.'
      operationId: getPaymentInstruction
      tags:
        - Payment Instructions
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payment instruction resource.
              schema:
                type: string
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404PaymentInstruction'
      security:
        - apiKey: []
          accessToken:
            - banking/read
    put:
      summary: Update this payment instruction
      description: |-
        Perform a complete replacement of this payment instruction.
        Upon updating a payment instruction, the service automatically writes the
        payee and payment method properties to the associated payee resource.
        This operation may also update the account, by passing
        a new account URL in the `apiture:account` link.


        Some payment methods do not allow updating the payment instruction
        after it has been submitted.
        Updates are also prohibited if the `state` is `completed` or
        `rejected` or `failed`.
      operationId: updatePaymentInstruction
      tags:
        - Payment Instructions
      requestBody:
        description: A new payment instruction
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/paymentInstruction'
          application/hal+json:
            schema:
              $ref: '#/components/schemas/paymentInstruction'
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payment instruction resource.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404PaymentInstruction'
        '409':
          $ref: '#/components/responses/409UpdatePaymentInstruction'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422UpdatePaymentInstruction'
      security:
        - apiKey: []
          accessToken:
            - banking/write
    patch:
      summary: Update this payment instruction
      description: |-
        Perform a partial update of this payment instruction.
        Fields which are omitted are not updated. Nested `_embedded` and `_links` are ignored if
        included.


        Upon updating a payment instruction, the details
        in the payment are automatically written to the associated
        payee and to the corresponding payee's details for the payment method.
        A new payee is created if the payment instruction does not
        contain an `_id` that refers to an existing payee.


        Some payment methods do not allow updating the payment instruction
        after it has been submitted.
        Updates are also prohibited if the `state` is `completed` or
        `rejected` or `failed`.
      operationId: patchPaymentInstruction
      tags:
        - Payment Instructions
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      requestBody:
        description: The new payment instruction.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/paymentInstruction'
          application/hal+json:
            schema:
              $ref: '#/components/schemas/paymentInstruction'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payment instruction resource.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404PaymentInstruction'
        '409':
          $ref: '#/components/responses/409UpdatePaymentInstruction'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422UpdatePaymentInstruction'
      security:
        - apiKey: []
          accessToken:
            - banking/write
    delete:
      summary: Delete this payment instruction resource
      description: >-
        Delete this payment instruction resource and any resources that are owned by it. Only payment instruction with the `state` of `pending` may be
        deleted.
      operationId: deletePaymentInstruction
      tags:
        - Payment Instructions
      responses:
        '204':
          $ref: '#/components/responses/204Deleted'
        '409':
          description: Conflict. The payment instruction cannot be updated. Only `pending` payment instructions may be deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
      security:
        - apiKey: []
          accessToken:
            - banking/delete
      parameters: []
  /submittedPaymentInstructions:
    post:
      operationId: submitPaymentInstruction
      summary: Submit a payment instruction
      description: >-
        Submit a payment instruction to be processed by the financial institution. This changes the `state` property of the payment instruction to
        `submitted`. This operation is available via the `apiture:submit` link on the payment instruction resource, if and only if the payment
        instruction is eligible for the submit operation. The response is the updated representation of the payment instruction. The `If-Match`
        request header value, if passed, must match the current entity tag value of the payment instruction. This is a no-op if the `state` is
        `submitted`.


        This operation requires passing a valid challenge ID in the `Apiture-Challenge` request header if the `requiresMfaChallenge` is `true` in the
        [payment method definition](#op-getPaymentMethod). (See _Multi-factor authentication challenges_ in the API overview.)
      tags:
        - Payment Instruction Actions
      parameters:
        - $ref: '#/components/parameters/paymentInstructionQueryParam'
        - $ref: '#/components/parameters/ifMatchHeaderParam'
        - $ref: '#/components/parameters/apitureChallengeHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The payment instruction was updated and its `state` changed to `submitted`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update the resource to perform conditional updates.
              schema:
                type: string
        '204':
          description: 'No Content. If the payment has already been submitted, no changes are made. (This is an idempotent operation.)'
        '400':
          $ref: '#/components/responses/400SubmitPaymentInstruction'
        '409':
          $ref: '#/components/responses/409SubmitPaymentInstructionConflict'
        '412':
          $ref: '#/components/responses/412'
      security:
        - apiKey: []
          accessToken:
            - banking/write
  /cancelingPaymentInstructions:
    post:
      operationId: cancelPaymentInstruction
      summary: Cancel a payment instruction
      x-apiture-implemented: false
      description: |-
        Cancel a payment instruction. This changes the `state` property of the
        payment instruction to `canceled`. This operation is available via the
        `apiture:cancel` link on the payment instruction resource, if and only if
        the payment instruction is eligible for the cancel operation. Some payment
        memthods do not allow canceling. The response
        is the updated representation of the payment instruction. The `If-Match`
        request header value, if passed, must match the current entity tag value
        of the payment instruction. This is a no-op if the `state` is `canceled`.
      tags:
        - Payment Instruction Actions
      parameters:
        - $ref: '#/components/parameters/paymentInstructionQueryParam'
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The payment instruction was updated and its `state` changed to `canceled`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update the resource to perform conditional updates.
              schema:
                type: string
        '204':
          description: 'No Content. If the payment has already been canceled, no changes are made. (This is an idempotent operation.)'
        '400':
          $ref: '#/components/responses/400ProcessPaymentInstruction'
        '409':
          $ref: '#/components/responses/409ProcessPaymentInstructionConflict'
        '412':
          $ref: '#/components/responses/412'
      security:
        - apiKey: []
          accessToken:
            - banking/write
  /processingPaymentInstructions:
    post:
      operationId: processPaymentInstruction
      summary: Process a payment instruction
      description: |-
        Mark a payment instruction as in process.
        The `state` property of the payment is `processing`.
        This operation is available via the
        `apiture:process` link on the payment instruction resource, if and only if
        the payment instruction is eligible for the process operation. The response
        is the updated representation of the payment instruction. The `If-Match`
        request header value, if passed, must match the current entity tag value
        of the payment instruction. This is a no-op if the `state` is `processed`.


        This operation is allowed only for administrative applications.
      tags:
        - Payment Instruction Actions
      parameters:
        - $ref: '#/components/parameters/paymentInstructionQueryParam'
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The payment instruction was updated and its `state` changed to `processing`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update the resource to perform conditional updates.
              schema:
                type: string
        '204':
          description: 'No Content. If the payment has already been processed, no changes are made. (This is an idempotent operation.)'
        '400':
          $ref: '#/components/responses/400ProcessPaymentInstruction'
        '409':
          $ref: '#/components/responses/409ProcessPaymentInstructionConflict'
        '412':
          $ref: '#/components/responses/412'
      security:
        - apiKey: []
          accessToken:
            - admin/write
  /rejectedPaymentInstructions:
    post:
      operationId: rejectPaymentInstruction
      summary: Reject a payment instruction
      description: |-
        Reject a payment instruction.
        This changes the `state` property of the payment instruction to `rejected`.
        This operation is available via the `apiture:reject` link on the payment instruction resource, if and only if
        the payment instruction is eligible for the reject operation. The response
        is the updated representation of the payment instruction. The `If-Match`
        request header value, if passed, must match the current entity tag value
        of the payment instruction. This is a no-op if the `state` is `rejected`.


        This operation is allowed only for administrative applications.
      tags:
        - Payment Instruction Actions
      parameters:
        - $ref: '#/components/parameters/paymentInstructionQueryParam'
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The payment instruction was updated and its `state` changed to `rejected`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update the resource to perform conditional updates.
              schema:
                type: string
        '204':
          description: 'No Content. If the payment has already been rejected, no changes are made. (This is an idempotent operation.)'
        '400':
          $ref: '#/components/responses/400RejectPaymentInstruction'
        '409':
          $ref: '#/components/responses/409RejectPaymentInstructionConflict'
        '412':
          $ref: '#/components/responses/412'
      security:
        - apiKey: []
          accessToken:
            - admin/write
  /completedPaymentInstructions:
    post:
      operationId: completePaymentInstruction
      summary: Complete a payment instruction
      description: |-
        Complete a payment instruction and create a
        [`payment`](#schema-payment) in the [payment history](#op-getHistory).
        This changes the `state` property of the payment instruction to `completed`
        the system deletes it after its expiration date has passed.
        The state of the new historical `payment` is also `completed`.
        This operation is available via the
        `apiture:complete` link on the payment instruction resource, if and only if
        the payment instruction is eligible for the complete operation. The response
        is the updated representation of the payment instruction. The `If-Match`
        request header value, if passed, must match the current entity tag value
        of the payment instruction. This is a no-op if the `state` is `completed`.


        This operation is allowed only for administrative applications.
      tags:
        - Payment Instruction Actions
      parameters:
        - $ref: '#/components/parameters/paymentInstructionQueryParam'
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The payment instruction was updated and its `state` changed to `completed`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update the resource to perform conditional updates.
              schema:
                type: string
        '204':
          description: 'No Content. If the payment has already been completed, no changes are made. (This is an idempotent operation.)'
        '400':
          $ref: '#/components/responses/400CompletePaymentInstruction'
        '409':
          $ref: '#/components/responses/409CompletePaymentInstructionConflict'
        '412':
          $ref: '#/components/responses/412'
      security:
        - apiKey: []
          accessToken:
            - admin/write
  /failedPaymentInstructions:
    post:
      operationId: failPaymentInstruction
      summary: Fail a payment instruction
      description: |-
        Mark payment instruction as failed and create a
        [`payment`](#schema-payment) in the [payment history](#op-getHistory).
        This changes the `state` property of the payment instruction to `failed`;
        the system deletes it after its expiration date has passed.
        The state of the new historical `payment` is also `failed`.
        Mark a payment instruction as failed. This changes the `state` property of the
        payment instruction to `failed`. This operation is available via the
        `apiture:fail` link on the payment instruction resource, if and only if
        the payment instruction is eligible for the reject operation. The response
        is the updated representation of the payment instruction. The `If-Match`
        request header value, if passed, must match the current entity tag value
        of the payment instruction. This is a no-op if the `state` is `failed`.


        This operation is allowed only for administrative applications.
      tags:
        - Payment Instruction Actions
      parameters:
        - $ref: '#/components/parameters/paymentInstructionQueryParam'
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The payment instruction was updated and its `state` changed to `failed`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentInstruction'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update the resource to perform conditional updates.
              schema:
                type: string
        '204':
          description: 'No Content. If the payment has already failed, no changes are made. (This is an idempotent operation.)'
        '400':
          $ref: '#/components/responses/400RejectPaymentInstruction'
        '409':
          $ref: '#/components/responses/409RejectPaymentInstructionConflict'
        '412':
          $ref: '#/components/responses/412'
      security:
        - apiKey: []
          accessToken:
            - admin/write
  /history:
    get:
      summary: Return a page of payments from the payment history. This lists payments for all the user's accounts unless the `?account=` filter is applied.
      description: >-
        Return a [paginated](https://developer.apiture.com/docs/concepts/pagination) [sortable](https://developer.apiture.com/docs/concepts/sorting)
        [filterable](https://developer.apiture.com/docs/concepts/filtering) [searchable](https://developer.apiture.com/docs/concepts/searching)
        collection of payments. The [links](https://developer.apiture.com/docs/concepts/links) in the response include pagination links.
      operationId: getHistory
      tags:
        - Payments
      parameters:
        - name: type
          description: Filter the response to list only payments of this payment method `type`.
          in: query
          schema:
            type: string
            x-apiture-enum: paymentMethodType
            enum:
              - billPay
              - personToPerson
              - wireTransfer
            description: |-


              <strong><code>schema</code></strong> strings may have one of the following
              [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

              <table>
              <tr>
                <th>Value</th><th>Description</th>
              </tr>

              <tr>
                  <td><strong><code>wireTransfer</code></strong></td><td>Wire Transfer: High value funds transfers through Fedwire or international wire transfer networks.</td>
                  </tr>
              <tr>
                  <td><strong><code>billPay</code></strong></td><td>Bill Pay: Pay bills and make other payments through checks or similar electronic funds transfer.</td>
                  </tr>
              <tr>
                  <td><strong><code>personToPerson</code></strong></td><td>Person To Person: One-time payments to, or requests for payment from, a person via a person-to-person payment network.</td>
                  </tr>
              </table>


              These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
              named `paymentMethodType` in the response from the [`getLabels`](#op-getLabels) operation.
        - name: state
          description: Filter the response to list only payment in this `state`.
          in: query
          style: pipeDelimited
          schema:
            type: array
            uniqueItems: true
            items:
              type: string
              x-apiture-enum: paymentInstructionState
              enum:
                - pending
                - submitted
                - canceled
                - processing
                - rejected
                - completed
              description: |-


                <strong><code>items</code></strong> strings may have one of the following
                [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

                <table>
                <tr>
                  <th>Value</th><th>Description</th>
                </tr>

                <tr>
                    <td><strong><code>pending</code></strong></td><td>Pending: A new payment instruction that has not been submitted.</td>
                    </tr>
                <tr>
                    <td><strong><code>submitted</code></strong></td><td>Submitted: A payment instruction that the user has submitted for processing.</td>
                    </tr>
                <tr>
                    <td><strong><code>canceled</code></strong></td><td>Canceled: A payment instruction that the user has canceled.</td>
                    </tr>
                <tr>
                    <td><strong><code>processing</code></strong></td><td>Processing: A payment instruction that the financial institution has processed but which is not yet complete.</td>
                    </tr>
                <tr>
                    <td><strong><code>rejected</code></strong></td><td>Rejected: A payment instruction that the financial institution has rejected.</td>
                    </tr>
                <tr>
                    <td><strong><code>completed</code></strong></td><td>Completed: A payment instruction that has completed and debited from the account.</td>
                    </tr>
                </table>


                These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
                named `paymentInstructionState` in the response from the [`getLabels`](#op-getLabels) operation.
        - name: account
          description: 'Filter the response to list only payment for the specified accounts, identified by the `accountId`.'
          in: query
          style: pipeDelimited
          schema:
            type: array
            uniqueItems: true
            maxItems: 8
            items:
              type: string
        - name: start
          in: query
          description: The zero-based index of the first payment item to include in this page. The default 0 denotes the beginning of the collection.
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          description: The maximum number of payment representations to return in this page.
          schema:
            type: integer
            format: int32
            default: 100
        - name: sortBy
          in: query
          schema:
            type: string
          description: >-
            Optional sort criteria. See [sort criteria format](https://developer.apiture.com/docs/concepts/sorting), such as `?sortBy=field1,-field2`.
            The default sort order is by `completedAt` (descending).<br>This collection may be sorted by following properties:<br>&bullet;
            `completedAt`<br>&bullet; `type`<br>&bullet; `state`<br>&bullet; `amount.value`
        - name: filter
          in: query
          description: >-
            Optional filter criteria. See [filtering](https://developer.apiture.com/docs/concepts/filtering).<br>This collection may be filtered by
            following properties and functions:<br>&bullet;  Property `type` using functions `eq`,  `ne`,  `in`<br>&bullet;  Property `state` using
            functions `eq`,  `ne`,  `in`<br>&bullet;  Property `account` using functions `eq`,  `ne`,  `in`<br>&bullet;  Property `completedAt` using
            functions `lt`,  `le`,  `gt`,  `ge`<br>&bullet;  Property `createdBy` using functions `eq`,  `in`<br>&bullet;  Property `amount.value`
            using functions `lt`,  `le`,  `gt`,  `ge`,  `eq`,  `ne`
          schema:
            type: string
        - $ref: '#/components/parameters/qQueryParam'
      x-apiture-traits:
        sortBy:
          - completedAt
          - type
          - state
          - amount.value
        filters:
          type:
            filter:
              - eq
              - ne
              - in
          state:
            filter:
              - eq
              - ne
              - in
          account:
            filter:
              - eq
              - ne
              - in
          completedAt:
            filter:
              - lt
              - le
              - gt
              - ge
          createdBy:
            filter:
              - eq
              - in
          amount.value:
            filter:
              - lt
              - le
              - gt
              - ge
              - eq
              - ne
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentHistory'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/paymentHistory'
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422'
      security:
        - apiKey: []
          accessToken:
            - banking/read
  '/history/{paymentId}':
    parameters:
      - $ref: '#/components/parameters/paymentIdPathParam'
    get:
      summary: Fetch a representation of this payment
      description: 'Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this payment resource.'
      operationId: getPayment
      tags:
        - Payments
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/payment'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this payment resource.
              schema:
                type: string
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404Payment'
      security:
        - apiKey: []
          accessToken:
            - banking/read
  /labels:
    get:
      summary: Localized Labels
      description: >-
        Return a JSON object which defines labels for enumeration types defined by the schemas defined in this API. The labels in the response may not
        all match the requested language; some may be in the default language (`en-us`).
      operationId: getLabels
      security:
        - apiKey: []
      parameters:
        - name: Accept-Language
          in: header
          schema:
            type: string
          description: >-
            The weighted language tags which indicate the user's preferred natural language for the localized labels in the response, as per [RFC
            7231](https://tools.ietf.org/html/rfc7231#section-5.3.5).
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/labelGroups'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/labelGroups'
      tags:
        - API
  /:
    get:
      summary: Top-level resources and operations in this API
      description: Return links to the top-level resources and operations in this API.
      operationId: getApi
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/root'
            application/json:
              schema:
                $ref: '#/components/schemas/root'
      tags:
        - API
      security:
        - apiKey: []
      parameters: []
  /apiDoc:
    get:
      summary: Return API definition document
      description: Return the OpenAPI document that describes this API.
      operationId: getApiDoc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
            application/vnd.oai.openapi+json;version=3.0:
              schema:
                type: object
            application/vnd.oai.openapi;version=3.0:
              schema:
                type: object
      tags:
        - API
      security:
        - apiKey: []
      parameters: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: API-Key
      in: header
      description: 'API Key based authentication. See details at [Secure Access](https://developer.apiture.com/docs/secure-access).'
    accessToken:
      type: oauth2
      description: 'OAuth2 client access token authentication. See details at [Secure Access](https://developer.apiture.com/docs/secure-access).'
      flows:
        authorizationCode:
          authorizationUrl: 'https://auth.apiture.com/oauth2/authorize'
          tokenUrl: 'https://auth.apiture.com/auth/oauth2/token'
          refreshUrl: 'https://auth.apiture.com/auth/oauth2/token'
          scopes:
            banking/read: Read access to accounts and account-related resources such as transfers and transactions.
            banking/write: Write (update) access to accounts and account-related resources such as transfers and transactions.
            banking/delete: Delete access to If deletable accounts and account-related resources such as transfers.
            banking/readBalance: >-
              Read access to account balances. This must be granted in addition to the `banking/read` scope in order to view balances, but is included
              in the `banking/full` scope.
            banking/full: Full access to accounts and account-related resources such as transfers and transactions.
  parameters:
    apitureChallengeHeaderParam:
      name: Apiture-Challenge
      description: >-
        The unique identifier of a Challenge resource which demonstrates the user has recently verified their identity. See the discussion of
        _Multi-factor authentication challenges_ above. The value must be the `_id` string of a valid, redeemable Challenge resource which matches the
        challenge context.
      in: header
      required: false
      schema:
        type: string
    paymentInstructionQueryParam:
      name: paymentInstruction
      required: true
      in: query
      schema:
        type: string
      description: >-
        A string which uniquely identifies a payment instruction which is to added to the submitted payment instructions resource set. This may be the
        unique `_id` of the payment instruction (`{paymentInstructionId}`) or the URI of the payment instruction.
    paymentMethodTypePathParam:
      name: paymentMethodType
      description: >-
        The unique name (type) of a payment method definition, corresponding to the `type` property of the
        [`paymentMethodDefinition`](#schema-paymentMethodDefinition).
      in: path
      schema:
        type: string
      required: true
    filterQueryParam:
      name: filter
      in: query
      description: 'Optional filter criteria. See [filtering](https://developer.apiture.com/docs/concepts/filtering).'
      schema:
        type: string
    qQueryParam:
      name: q
      in: query
      description: 'Optional search string. See [searching](https://developer.apiture.com/docs/concepts/searching).'
      schema:
        type: string
    payeeIdPathParam:
      name: payeeId
      description: The unique identifier of this payee. This is an opaque string.
      in: path
      schema:
        type: string
      required: true
    paymentInstructionIdPathParam:
      name: paymentInstructionId
      description: The unique identifier of this payment instruction. This is an opaque string.
      in: path
      schema:
        type: string
      required: true
    paymentIdPathParam:
      name: paymentId
      description: The unique identifier of this payment. This is an opaque string.
      in: path
      schema:
        type: string
      required: true
    ifMatchHeaderParam:
      name: If-Match
      description: 'The entity tag that was returned in the `ETag` response. If passed, this must match the current entity tag of the resource.'
      in: header
      schema:
        type: string
    ifNoneMatchHeaderParam:
      name: If-None-Match
      description: >-
        The entity tag that was returned in the `ETag` response. If the resource's current entity tag matches, the `GET` returns 304 (Not Modified)
        and no response body, else the resource representation will be returned.
      in: header
      schema:
        type: string
  responses:
    '304':
      description: Not Modified. The resource has not been modified since it was last fetched.
    '400':
      description: >-
        Bad Request. The request body or one or more of the query parameters was not well formed. The `_error` field in the response contains details
        about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    '412':
      description: >-
        Precondition Failed. The supplied `If-Match` header value does not match the most recent `ETag` response header value. The resource has
        changed in the interim.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    '422':
      description: >-
        Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid. The `_error` field in the response will
        contain details about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    400RejectPaymentInstruction:
      description: |-
        Bad Request. The paymentInstruction parameter was malformed or does not refer to an existing or accessible payment instruction.

        This error response may have one of the following `type` values:
        * [`paymentInstructionRefNotFound`](#err-paymentInstructionRefNotFound)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
      x-apiture-errors:
        - paymentInstructionRefNotFound
    409RejectPaymentInstructionConflict:
      description: >-
        Conflict. The request to reject the payment instruction is not allowed. The `_error` field in the response contains details about the request
        error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    400CompletePaymentInstruction:
      description: |-
        Bad Request. The paymentInstruction parameter was malformed or does not refer to an existing or accessible payment instruction.

        This error response may have one of the following `type` values:
        * [`paymentInstructionRefNotFound`](#err-paymentInstructionRefNotFound)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
      x-apiture-errors:
        - paymentInstructionRefNotFound
    409CompletePaymentInstructionConflict:
      description: >-
        Conflict. The request to complete the payment instruction is not allowed. The `_error` field in the response contains details about the
        request error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    400ProcessPaymentInstruction:
      description: |-
        Bad Request. The paymentInstruction parameter was malformed or does not refer to an existing or accessible payment instruction.

        This error response may have one of the following `type` values:
        * [`paymentInstructionRefNotFound`](#err-paymentInstructionRefNotFound)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
      x-apiture-errors:
        - paymentInstructionRefNotFound
    409ProcessPaymentInstructionConflict:
      description: >-
        Conflict. The request to process the payment instruction is not allowed. The `_error` field in the response contains details about the request
        error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    400SubmitPaymentInstruction:
      description: |-
        Bad Request. The paymentInstruction parameter was malformed or does not refer to an existing or accessible payment instruction.

        This error response may have one of the following `type` values:
        * [`paymentInstructionRefNotFound`](#err-paymentInstructionRefNotFound)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
      x-apiture-errors:
        - paymentInstructionRefNotFound
    409SubmitPaymentInstructionConflict:
      description: >-
        Conflict. The request to submit the payment instruction is not allowed, or the MFA challenge content (if required) is missing or invalid. The
        `_error` field in the response contains details about the request error.


        This error response may have one of the following `type` values:

        * [`missingApitureChallengeHeader`](#err-missingApitureChallengeHeader)

        * [`challengeRefNotFound`](#err-challengeRefNotFound)

        * [`challengedNotVerified`](#err-challengedNotVerified)

        * [`challengedExpired`](#err-challengedExpired)

        * [`challengedAlreadyRedeemed`](#err-challengedAlreadyRedeemed)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/challengeErrorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/challengeErrorResponse'
      x-apiture-errors:
        - missingApitureChallengeHeader
        - challengeRefNotFound
        - challengedNotVerified
        - challengedExpired
        - challengedAlreadyRedeemed
    404PaymentMethodDefinition:
      description: >-
        Not Found. There is no such payment method resource at the specified `{paymentMethodType}`. The `_error` field in the response contains
        details about the request error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404Payee:
      description: >-
        Not Found. There is no such payee resource at the specified `{payeeId}`. The `_error` field in the response contains details about the payment
        instruction error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    409UpdatePaymentInstruction:
      description: |-
        Conflict. The payment instruction cannot be updated.

        This error response may have one of the following `type` values:
        * [`paymentMethodDisallowsUpdates`](#err-paymentMethodDisallowsUpdates)
        * [`cannotUpdateCompletedPaymentInstructions`](#err-cannotUpdateCompletedPaymentInstructions)
        * [`cannotChangePaymentMethodType`](#err-cannotChangePaymentMethodType)
      x-apiture-errors:
        - paymentMethodDisallowsUpdates
        - cannotUpdateCompletedPaymentInstructions
        - cannotChangePaymentMethodType
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    422UpdatePaymentInstruction:
      description: |-
        Conflict. The payment instruction cannot be updated.

        This error response may have one of the following `type` values:
        * [`noSuchPayee`](#err-noSuchPayee)
        * [`paymentMethodMismatch`](#err-paymentMethodMismatch)
        * [`invalidAttachment`](#err-invalidAttachment)
      x-apiture-errors:
        - noSuchPayee
        - paymentMethodMismatch
        - invalidAttachment
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    422CreatePaymentInstruction:
      description: |-
        Conflict. The payment instruction cannot be updated.

        This error response may have one of the following `type` values:
        * [`noSuchPayee`](#err-noSuchPayee)
        * [`invalidAccount`](#err-invalidAccount)
        * [`paymentMethodMismatch`](#err-paymentMethodMismatch)
        * [`invalidAttachment`](#err-invalidAttachment)
      x-apiture-errors:
        - noSuchPayee
        - invalidAccount
        - paymentMethodMismatch
        - invalidAttachment
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404PaymentInstruction:
      description: >-
        Not Found. There is no such payment instruction resource at the specified `{paymentInstructionId}`. The `_error` field in the response
        contains details about the request error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404Payment:
      description: >-
        Not Found. There is no such payment resource at the specified `{paymentId}`. The `_error` field in the response contains details about the
        request error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    204Deleted:
      description: No Content. The resource was deleted successfully.
  schemas:
    paymentMethodConsentNeeded:
      title: Payment Method Consent Needed (v1.0.0)
      description: |-
        How often the financial institution requires the banking customer to give consent to this payment method's terms and conditions.

        <strong><code>paymentMethodConsentNeeded</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>none</code></strong></td><td>None: The banking customer does not have to give explicit consent to the terms and conditions of this payment method.</td>
            </tr>
        <tr>
            <td><strong><code>oneTime</code></strong></td><td>One Time: The banking customer must give explicit consent to the terms and conditions of this payment method one time before using this payment method.</td>
            </tr>
        <tr>
            <td><strong><code>perRequest</code></strong></td><td>Per Request: The financial institution requires the banking customer to give consent to the payment method's terms and conditions on each payment request.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `paymentMethodConsentNeeded` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      x-apiture-enum: paymentMethodConsentNeeded
      enum:
        - none
        - oneTime
        - perRequest
      example: oneTime
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    paymentMethodDefinition:
      title: Payment Method Definition (v1.0.0)
      description: >-
        Defines a payment method and its fees and its contraints. Payment methods are also known as payment channels. Each payment instruction uses
        exactly one payment method and the payment instruction has properties that are specific to that payment method. The
        [`paymentMethodDefinitions`](#schema-paymentMethodDefinitions) resource contains the complete set of payment method definitions.
      example:
        type: wireTransfer
        label: Wire Transfer
        description: >-
          Send funds via _wire transfer_, also known as Real Time Gross Settlement (RTGS). In the US, wire transfers are processed by Fedwire, the US
          Federal Reserve Bank network. *Note*: There is a fee for each submitted wire transfer.
        _profile: 'https://api.apiture.com/schemas/payments/paymentMethodDefinition/v1.0.0/profile.json'
        paymentLimit:
          amount: '200000.00'
          currency: USD
        termsAndConditionsUri: 'https://cdn.apiture.com/documents/terms/wireTransfer/2020-07-10.pdf'
        termsAndConditionsContextUri: 'https://api.devbank.apiture.com/payments/paymentMethodDefintions/billPayment'
        consentNeeded: perRequest
        requiresMfaChallenge: true
        fees:
          transaction: '19.00'
          currency: USD
        schedulingAllowed: false
        recurringSchedulesAllowed: false
        cancelAllowed: false
        updateAllowed: false
        presentHelpAfter: P180D
        expirationPeriod: P7D
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - type
            - label
            - description
            - paymentLimit
            - termsAndConditionsUri
            - termsAndConditionsContextUri
            - consentNeeded
            - enabled
            - requiresMfaChallenge
            - fees
            - schedulingAllowed
            - recurringSchedulesAllowed
            - cancelAllowed
            - updateAllowed
            - presentHelpAfter
            - expirationPeriod
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        type:
          description: 'The name of this payment method. This is the `{paymentMethodType}` in the [`getPaymentMethod` operation](#op-getPaymentMethod).'
          type: string
          example: wireTransfer
          allOf:
            - $ref: '#/components/schemas/paymentMethodType'
        label:
          description: 'A title or label for this payment method, suitable for use in the user interface.'
          type: string
          minLength: 4
          maxLength: 32
          example: Wire Transfer
        description:
          description: The description  of this payment method.
          type: string
          minLength: 4
          maxLength: 256
          format: markdown
          example: >-
            Send funds via _wire transfer_, also as Real Time Gross Settlement (RTGS). In the US, wire transfers are processed by Fedwire, the US
            Federal Reserve Bank network. *Note*: There is a fee for each submitted wire transfer.
        paymentLimit:
          description: The maximum amount a user may submit per payment.
          allOf:
            - $ref: '#/components/schemas/paymentAmount'
          example:
            amount: '200000.00'
            currency: USD
        termsAndConditionsUri:
          description: The URI of a document that lists the terms and conditions for using this payment method
          type: string
          format: uri
          maxLength: 2048
          example: 'https://cdn.apiture.com/documents/terms/wireTransfer/2020-07-10.pdf'
        termsAndConditionsContextUri:
          description: >-
            The context in which banking customer gives terms and conditions consent. If different payment methods use the same document URI and same
            context URI, then the user need only give consent one time to use all the payment methods. If different payment methods share the same
            document URIs but have a different context URI, or they have different document URIs, the payments service will require the customer to
            give consent to use each payment method. For the first case, the financial institution may use URI of the
            `/payments/paymentMethodDefintions/` collection resource; for the second case, the financial institution may use the URI of each
            individual payment method definition, such as `/payments/paymentMethodDefintions/billPayment` or
            `/payments/paymentMethodDefintions/personToPerson`.
          type: string
          format: uri
          maxLength: 2048
          example: 'https://api.devbank.apiture.com/payments/paymentMethodDefintions/billPayment'
        consentNeeded:
          description: How often the financial institution requires the banking customer to give consent to this payment method's terms and conditions.
          allOf:
            - $ref: '#/components/schemas/paymentMethodConsentNeeded'
          example: oneTime
        enabled:
          description: >-
            Whether this payment method is globally enabled or not. This value is also defined at a banking product (`product.paymentsEnabled`) and at
            an account level (`account.paymentsEnabled`). This property and and the account-level setting must be true to create and submit a payment
            instruction using this payment method.
          type: boolean
          default: false
        requiresMfaChallenge:
          description: >-
            If true, the user must complete a multi-factor authentication challengs when submitting
            [`submitPaymentInstruction`](#op-submitPaymentInstruction) the payment instructions to be processed.
          type: boolean
        fees:
          description: Fees that the financial institution charges for this payment method.
          allOf:
            - $ref: '#/components/schemas/paymentMethodFees'
        schedulingAllowed:
          description: >-
            If `true`, banking customers can schedule payments to be made in the future. If `false`, the payment is executed automatically the day the
            customer submits it or the next financial institution processing day.
          type: boolean
          example: false
        recurringSchedulesAllowed:
          description: >-
            If `true`, banking customers can schedule recurring payments; if `false`, only one time payments may be scheduled. This is always `false`
            if `schedulingAllowed`.
          type: boolean
          example: false
        cancelAllowed:
          description: >-
            If `true`, banking customers can cancel a payments request after submitting it. if `false`, customers can cancel or delete only `pending`
            payments.
          type: boolean
          example: false
        updateAllowed:
          description: >-
            If `true`, banking customers can update a payment instruction after submitting it. if `false`, customers can modify only `pending`
            payments.
          type: boolean
          example: false
        presentHelpAfter:
          description: >-
            The length of time that must pass before the user interface should present help or instructions (if any) for using this payment method.
            This value is an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) string, using the form `P[n]M` or `P[n]D`  to
            specify the number of months or days, respectively. For example, if the value is `P180D`, the client only presents the instructions to a
            customer if more than 180 days have passed since the customer last used this payment method.
          type: string
          format: period
          pattern: '^P(([1-9][0-9]{0,3}D)|([1-9][0-9]?M))$'
          example: P180D
        expirationPeriod:
          description: >-
            If set, the Payments service will automatically delete `pending` payments of this payment method if the customer does not submit them
            within this time period after they created the request. This value is an [ISO 8601
            duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) string, using the form `P[n]M` or `P[n]D`  to specify the number of months or
            days, respectively. For example, if the value is `P7D`, the service periodically deletes pending payment requsts that are older than 7
            days.
          type: string
          example: P7D
          pattern: '^P(([1-9][0-9]{0,3}D)|([1-9][0-9]?M))$'
      type: object
      x-apiture-flattened: true
    paymentMethodFees:
      title: Payment Method Fees (v1.0.0)
      description: Itemized fees for using a payment method.
      type: object
      properties:
        currency:
          description: 'The [ISO 4217 three-character currency code](https://en.wikipedia.org/wiki/ISO_4217) for the fees. This is always upper case ASCII.'
          type: string
          minLength: 3
          maxLength: 3
          example: USD
          default: USD
        transaction:
          description: >-
            The per-payment transaction fee, in the given `currency`, that the financial institution charges to process payments using this payment
            method. The numeric value is represented as a string so that it can be exact with no loss of precision.
          example: '19.00'
          type: string
          x-apiture-todo:
            - 'add other types, such as monthly recurring or maintenance fee? one-time enrollment fee? non-use fee?'
      example:
        currency: USD
        transaction: '19.00'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    paymentMethodDefinitionsEmbedded:
      title: Payment Method Definitions Embedded Objects (v1.0.0)
      description: Payment method definitions embedded objects.
      type: object
      properties:
        items:
          description: An array containing payment method items.
          type: array
          items:
            $ref: '#/components/schemas/paymentMethodDefinition'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    paymentMethodDefinitions:
      title: Payment Method Collection (v1.0.0)
      description: >-
        Collection of payment method definitions. The items in the collection are ordered in the `_embedded.items` array; the collection `name` is
        `paymentMethodDefinitions`. This resource contains each [`paymentMethodDefinition`](#schema-paymentMethodDefinition) that the Payments API
        supports.
      example:
        _profile: 'https://api.apiture.com/schemas/payments/paymentMethodDefinitions/v1.0.0/profile.json'
        name: paymentMethodDefinitions
        start: 10
        limit: 10
        count: 3
        _links:
          self:
            href: 'https://api.devbank.apiture.com/payments/paymentMethodDefinitions'
        _embedded:
          items:
            - type: wireTransfer
              label: Wire Transfer
              description: >-
                Send funds via _wire transfer_, also as Real Time Gross Settlement (RTGS). In the US, wire transfers are processed by Fedwire, the US
                Federal Reserve Bank network. *Note*: There is a fee for each submitted wire transfer.
              _profile: 'https://api.apiture.com/schemas/payments/paymentMethodDefinition/v1.0.0/profile.json'
              paymentLimit:
                amount: '200000.00'
                currency: USD
              termsAndConditionsUri: 'https://cdn.apiture.com/documents/terms/wireTransfer/2020-07-10.pdf'
              termsAndConditionsContextUri: 'https://api.devbank.apiture.com/payments/paymentMethodDefintions/billPayment'
              consentNeeded: perRequest
              requiresMfaChallenge: true
              fees:
                currency: USD
                transaction: '19.00'
              schedulingAllowed: false
              recurringSchedulesAllowed: false
              cancelAllowed: false
              updateAllowed: false
              presentHelpAfter: P180D
              expirationPeriod: P7D
              _links:
                self:
                  href: 'https://api.devbank.apiture.com/payments/paymentMethodDefinitions/wireTransfer'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/collection'
        - properties:
            - _embedded
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          type: object
          description: The list of payment method definitions.
          allOf:
            - $ref: '#/components/schemas/paymentMethodDefinitionsEmbedded'
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        count:
          description: >-
            The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
            is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
            filter.
          type: integer
        start:
          description: The start index of this page of items.
          type: integer
        limit:
          description: The maximum number of items per page.
          type: integer
        name:
          description: The name of the collection.
          type: string
      type: object
      x-apiture-flattened: true
    payeeType:
      title: Payee Type (v1.0.0)
      description: |-
        The type of the payee, either a person or an organization.

        <strong><code>payeeType</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>person</code></strong></td><td>Person: The payee is a person.</td>
            </tr>
        <tr>
            <td><strong><code>organization</code></strong></td><td>Organization: The payee is an organization such as a business.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `payeeType` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      x-apiture-enum: payeeType
      enum:
        - person
        - organization
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    personPayee:
      title: Person (v1.0.0)
      description: Attributes of a payee that is a person.
      type: object
      required:
        - firstName
        - lastName
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/contactName'
      properties:
        firstName:
          description: The person's first name (or given name).
          type: string
        middleName:
          description: The person's middle name.
          type: string
        lastName:
          description: The person's last name (or surname).
          type: string
      x-apiture-flattened: true
    organizationPayee:
      title: Person (v1.0.0)
      description: Properties of a payee that is an organization.
      type: object
      required:
        - name
      properties:
        name:
          description: The organization's name.
          type: string
          maxLength: 128
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    payeeFields:
      title: Payee Fields (v1.0.0)
      description: Properties used in other payee schemas.
      x-apiture-fragment: true
      required:
        - type
        - address
      type: object
      properties:
        type:
          description: 'The type of the payee, either a person or an organization.'
          allOf:
            - $ref: '#/components/schemas/payeeType'
        person:
          description: Properties of a `person` payee.
          allOf:
            - $ref: '#/components/schemas/personPayee'
        organization:
          description: Properties of an `organization` payee.
          allOf:
            - $ref: '#/components/schemas/organizationPayee'
        address:
          description: >-
            The payee's primary or mailing address. The financial institution may use the address to verify the payee. For some payment methods such
            as bill payment, a check is sent to this address.
          allOf:
            - $ref: '#/components/schemas/simpleAddress'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    paymentInstitutionAddress:
      title: Payment Institution Address (v1.0.0)
      description: The address of the financial institution used in a payment.
      required:
        - addressLine1
        - city
        - postalCode
        - countryCode
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/simpleAddress'
      properties:
        addressLine1:
          description: 'The first street address line of the address, normally a house number and street name.'
          type: string
          minLength: 4
          maxLength: 128
        addressLine2:
          description: The optional second street address line of the address.
          type: string
          maxLength: 128
        city:
          description: The name of the city or municipality.
          type: string
          minLength: 2
          maxLength: 128
        regionCode:
          description: 'The mailing address region code, such as state in the US, or a province in Canada. This is normalized to uppercase.'
          type: string
          example: NC
          minLength: 2
          maxLength: 2
          pattern: '^[a-zA-Z]{2}$'
        postalCode:
          description: 'The mailing address postal code, such as a US Zip or Zip+4 code, or a Canadian postal code.'
          type: string
          example: 28401-5405
          minLength: 5
          maxLength: 10
          pattern: '^[0-9]{5}(?:-[0-9]{4})?$'
        countryCode:
          description: 'The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. This is normalized to uppercase.'
          type: string
          minLength: 2
          maxLength: 2
          pattern: '^[a-zA-Z]{2}$'
      type: object
      x-apiture-flattened: true
    paymentInstitution:
      title: Payment Institution (v1.0.0)
      description: The payee's external financial institution through which payments are made.
      type: object
      required:
        - name
        - address
      properties:
        name:
          description: The name of the payee's financial institution.
          type: string
          maxLength: 128
        address:
          description: The address of the payee's financial institution.
          allOf:
            - $ref: '#/components/schemas/paymentInstitutionAddress'
        routingNumber:
          description: >-
            The nine-digit [ABA routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number) of the financial institution. Required and
            only used if and only if the financial institution's address `countryCode` is `US`.
          type: string
          minLength: 9
          maxLength: 9
          example: '021000021'
          pattern: '^[0-9]{9}$'
        swiftCode:
          description: >-
            The eight- or eleven- or twelve- character [ISO 9362 Society for Worldwide Interbank Financial
            Telecommunication](https://en.wikipedia.org/wiki/ISO_9362) (SWIFT) code for international wire transfers. Required and only used if the
            financial institution's address `countryCode` is _not_ `US`.
          type: string
          minLength: 8
          maxLength: 12
          example: MIDLGBXX
          pattern: '^[a-zA-Z0-9]{8}([a-zA-Z0-9]{3})?$'
        forFurtherCreditMemo:
          description: >-
            Additional "for further credit to" instructions or notes to assist the financial institution when processing the wire transfer, such as
            the ultimate recipient of funds at the beneficial institution.
          type: string
          maxLength: 500
      example:
        name: 3rd Party Bank
        address:
          addressLine1: 500 N. Elm St
          city: Norman
          regionCode: OK
          postalCode: '73070'
          countryCode: US
        routingNumber: '021000021'
        forFurtherCreditMemo: 'Attention: John Smith'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    billPayPaymentInstruction:
      title: Wire Payment for a Payment Instruction (v0.1.0)
      description: The data used to pay a payee via wire transfer. (This will be defined in a future release of the API.)
      x-apiture-version: 0.1.0
      type: object
      properties: {}
      x-apiture-flattened: true
    personToPersonPaymentInstruction:
      title: Bill Pay Data for a Payment Instruction (v0.1.0)
      description: The data used to pay a payee via wire transfer. (This will be defined in a future release of the API.)
      x-apiture-version: 0.1.0
      type: object
      properties: {}
      x-apiture-flattened: true
    paymentInstructionAttachment:
      title: paymentInstructionAttachment (v1.0.0)
      description: A file attached to a payment instruction.
      type: object
      required:
        - uri
      properties:
        name:
          description: The file name (excluding any path or URL prefix).
          type: string
          minLength: 6
          maxLength: 64
        contentType:
          description: 'The [media type](https://tools.ietf.org/html/rfc6838) for this attachment.'
          type: string
          minLength: 6
          maxLength: 64
        uri:
          description: The document URI. The content a this URI must be publicly accessible.
          type: string
          format: uri
          maxLength: 2048
      example:
        name: invoice-2020-10-01a.pdf
        contentType: application/pdf
        uri: 'https://api.devbank.apiture.com/vault/files/91c28be9-ef79-4b94-a2a0-e0aa9ddcab99/content'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    wireTransferPaymentInstruction:
      title: Wire Transfers Data for a Payment Instruction (v1.0.0)
      description: The data used to pay a payee via wire transfer.
      required:
        - institution
        - accountNumber
      example:
        institution:
          name: 3rd Party Bank
          address:
            addressLine1: 500 N. Elm St
            city: Norman
            regionCode: OK
            postalCode: '73070'
            countryCode: US
          routingNumber: '021000021'
          forFurtherCreditMemo: 'Attention: John Smith'
        accountNumber: '9876543210'
        attachments:
          - name: invoice-2020-10-01a.pdf
            contentType: application/pdf
            uri: 'https://api.devbank.apiture.com/vault/files/91c28be9-ef79-4b94-a2a0-e0aa9ddcab99/content'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/payeeWireTransferMethodFields'
        - properties:
            - attachments
      properties:
        institution:
          description: The payee's financial institution.
          allOf:
            - $ref: '#/components/schemas/paymentInstitution'
        accountNumber:
          description: The payee's full account number at the financial institution.
          type: string
          minLength: 4
          maxLength: 34
          example: '9876543210'
        intermediaryInstitution:
          description: An optional intermediary financial institution that brokers the wire transfer.
          allOf:
            - $ref: '#/components/schemas/paymentInstitution'
        attachments:
          description: >-
            Optional documents attached to this wire transfer request. The financial institution might configure the maximum number of attachments to
            be less than 5.
          maxItems: 5
          type: array
          items:
            $ref: '#/components/schemas/paymentInstructionAttachment'
      type: object
      x-apiture-flattened: true
    payeeWireTransferMethodFields:
      title: Payee Wire Payment Method Fields (v1.0.0)
      description: The data used to pay a payee via wire transfer.
      x-apiture-fragment: true
      type: object
      properties:
        institution:
          description: The payee's financial institution.
          allOf:
            - $ref: '#/components/schemas/paymentInstitution'
        accountNumber:
          description: The payee's full account number at the financial institution.
          type: string
          minLength: 4
          maxLength: 34
          example: '9876543210'
        intermediaryInstitution:
          description: An optional intermediary financial institution that brokers the wire transfer.
          allOf:
            - $ref: '#/components/schemas/paymentInstitution'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    payeeWireTransferMethod:
      title: Payee Wire Payment Payment Method (v1.0.0)
      description: >
        The data used to request a payment via wire transfer for a payee.



        <h3 class='schema-links' id="payeeWireTransferMethod-links" >Links</h3>


        Response and request bodies using this <strong><code>payeeWireTransferMethod</code></strong> schema may contain

        the following <a href='https://developer.apiture.com/docs/concepts/links'>links</a>:


        <table>

        <tr>
          <th>Rel</th><th>Summary</th><th>Method</th>
        </tr>


        <tr>

        <td><a href='#op-getPayeeWireTransferMethod'><strong><code>self</code></strong></a></td><td>Fetch payee's wire transfer
        parameters</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPayee'><strong><code>apiture:payee</code></strong></a></td><td>Fetch a representation of this
        payee</td><td><code>GET</code></td>

        </tr>

        </table>
      type: object
      required:
        - institution
        - accountNumber
      x-apiture-links:
        - rel: self
          operationId: getPayeeWireTransferMethod
        - rel: 'apiture:payee'
          operationId: getPayee
      example:
        _profile: 'https://api.apiture.com/schemas/payments/payeeWireTransferMethod/v1.0.0/profile.json'
        institution:
          name: 3rd Party Bank
          address:
            addressLine1: 500 N. Elm St
            city: Norman
            regionCode: OK
            postalCode: '73070'
            countryCode: US
          routingNumber: '021000021'
          forFurtherCreditMemo: 'Attention: John Smith'
        accountNumber: '9876543210'
        _links:
          self:
            href: 'https://api.devbank.apiture.com/payments/payees/2f4ae081-021e-4954-86f2-58c8de532992/paymentMethods/wiretransfer'
          'apiture:payee':
            href: 'https://api.devbank.apiture.com/payments/payees/2f4ae081-021e-4954-86f2-58c8de532992'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/payeeWireTransferMethodFields'
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        institution:
          description: The payee's financial institution.
          allOf:
            - $ref: '#/components/schemas/paymentInstitution'
        accountNumber:
          description: The payee's full account number at the financial institution.
          type: string
          minLength: 4
          maxLength: 34
          example: '9876543210'
        intermediaryInstitution:
          description: An optional intermediary financial institution that brokers the wire transfer.
          allOf:
            - $ref: '#/components/schemas/paymentInstitution'
      x-apiture-flattened: true
    payeeEmbeddedObjects:
      title: Payee Embedded Objects (v1.0.0)
      description: >-
        Objects embedded in a payee resource. These are not returned in a payee within the payees collection. Embedded objects are ignored in payee
        updates (update the referenced resources directly.)
      type: object
      properties:
        wireTransfer:
          description: The data used to pay this payee via wire transfer.
          allOf:
            - $ref: '#/components/schemas/payeeWireTransferMethod'
      example:
        wireTranfer:
          _profile: 'https://api.apiture.com/schemas/payments/payeeWireTransferMethod/v1.0.0/profile.json'
          institution:
            name: 3rd Party Bank
            address:
              addressLine1: 500 N. Elm St
              city: Norman
              regionCode: OK
              postalCode: '73070'
              countryCode: US
            forFurtherCreditMemo: 'Attention: John Smith'
          routingNumber: '021000021'
          accountNumber: '9876543210'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    createPayee:
      title: Create Payee (v1.0.0)
      description: |-
        The recipient of payments,
        also referred to as the _beneficiary_ or _receiver_ in specific payment methods.
        A payee represents a person or an oganization and contains their name and address.
        If the type is `person`, the `person` property contains the person's name and the `organization`
        property is ignored.
        If the type is `organization`, the `organization` property contains the organization's name and the `person`
        property is ignored.


        With some payment methods, the bank customer may also request a payment _from_ this person or organization.
      required:
        - type
        - address
      example:
        _profile: 'https://api.apiture.com/schemas/payments/createPayee/v1.0.0/profile.json'
        type: person
        person:
          firstName: John
          middleName: Daniel
          lastName: Smith
        address:
          addressLine1: 555 N Front Street
          addressLine2: Suite 5555
          city: Wilmington
          regionCode: NC
          postalCode: 28401-5405
          countryCode: US
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractRequest'
        - $ref: '#/components/schemas/payeeFields'
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        type:
          description: 'The type of the payee, either a person or an organization.'
          allOf:
            - $ref: '#/components/schemas/payeeType'
        person:
          description: Properties of a `person` payee.
          allOf:
            - $ref: '#/components/schemas/personPayee'
        organization:
          description: Properties of an `organization` payee.
          allOf:
            - $ref: '#/components/schemas/organizationPayee'
        address:
          description: >-
            The payee's primary or mailing address. The financial institution may use the address to verify the payee. For some payment methods such
            as bill payment, a check is sent to this address.
          allOf:
            - $ref: '#/components/schemas/simpleAddress'
      type: object
      x-apiture-flattened: true
    paymentAmount:
      title: Payment Amount (v1.0.0)
      description: A payment amount in a specific currency.
      properties:
        value:
          description: The net monetary value of the payment. The numeric value is represented as a string so that it can be exact with no loss of precision.
          example: '3456.78'
          type: string
        currency:
          description: >-
            The [ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) for this monetary value. This is always upper case ASCII. Note: ISO
            4217 defines three-character codes. However, ISO 4217 does not account for cryptocurrencies. Of note, DASH uses 4 characters.
          type: string
          minLength: 3
          maxLength: 3
          default: USD
      x-apiture-version: 1.0.0
      type: object
      x-apiture-flattened: true
    payee:
      title: Payee (v1.0.0)
      description: |-
        The recipient of payments,
        also referred to as the _beneficiary_ or _receiver_ in specific payment methods.
        A payee represents a person or an oganization and contains their name and address.
        If the type is `person`, the `person` property contains the person's name and the `organization`
        property is ignored.
        If the type is `organization`, the `organization` property contains the organization's name and the `person`
        property is ignored.


        A payee also has related resource which contain the details of the various payment methods
        for that payee. These data are included in the `_embedded` property in the [`getPayee`](#op-getPayee)
        operation and may be changed by the various operations such as [`updatePayeeWireTransferMethod`](#op-updatePayeeWireTransferMethod).


        With some payment methods, the bank customer may also request a payment _from_ this person or organization.
      required:
        - type
        - address
      example:
        _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
        _profile: 'https://api.apiture.com/schemas/payments/payee/v1.0.0/profile.json'
        type: person
        person:
          firstName: John
          middleName: Daniel
          lastName: Smith
        address:
          addressLine1: 555 N Front Street
          addressLine2: Suite 5555
          city: Wilmington
          regionCode: NC
          postalCode: 28401-5405
          countryCode: US
        createdBy: johnsmith1234
        createdAt: '2020-10-02T11:09:20.375Z'
        updatedAt: '2020-10-02T11:15:25.375Z'
        _embedded:
          wireTransfer:
            _id: 50086068-7e25-4fc8-aff1-c9b59bc2405d
            _profile: 'https://api.apiture.com/schemas/payments/payeeWireTransferMethod/v1.0.0/profile.json'
            institution:
              name: 3rd Party Bank
              address:
                addressLine1: 500 N. Elm St
                city: Norman
                regionCode: OK
                postalCode: '73070'
                countryCode: US
              routingNumber: '021000021'
              forFurtherCreditMemo: 'Attention: John Smith'
            accountNumber: '9876543210'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/payeeFields'
        - properties:
            - _id
            - createdBy
            - createdAt
            - updatedAt
            - _embedded
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: Objects related to this payee.
          allOf:
            - $ref: '#/components/schemas/payeeEmbeddedObjects'
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        type:
          description: 'The type of the payee, either a person or an organization.'
          allOf:
            - $ref: '#/components/schemas/payeeType'
        person:
          description: Properties of a `person` payee.
          allOf:
            - $ref: '#/components/schemas/personPayee'
        organization:
          description: Properties of an `organization` payee.
          allOf:
            - $ref: '#/components/schemas/organizationPayee'
        address:
          description: >-
            The payee's primary or mailing address. The financial institution may use the address to verify the payee. For some payment methods such
            as bill payment, a check is sent to this address.
          allOf:
            - $ref: '#/components/schemas/simpleAddress'
        _id:
          description: The unique identifier for this payee. This is an immutable opaque string.
          readOnly: true
          type: string
          maxLength: 64
        createdBy:
          description: The unique User Id of the person who created the Payee. This is derived and immutable.
          type: string
          readOnly: true
        createdAt:
          description: >-
            The date-time the customer created this payee (but not their payment method details). This is in [RFC
            3339](https://tools.ietf.org/html/rfc3339) format, UTC. This is derived and immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
        updatedAt:
          description: >-
            The date-time the payee last updated this payee (but not their payment method details) This is in [RFC
            3339](https://tools.ietf.org/html/rfc3339) format, UTC. This is derived and immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
      type: object
      x-apiture-flattened: true
    payeesEmbeddedObjects:
      title: Payees Embedded Objects (v1.0.0)
      description: 'The items in the [`payees`](#schema-payees) collection.'
      type: object
      properties:
        items:
          description: An array containing a page of payees.
          type: array
          items:
            $ref: '#/components/schemas/payee'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    payees:
      title: Payee Collection (v1.0.0)
      description: >-
        Collection of payees. The items in the collection are ordered in the `_embedded.items` array; the `name` is `payees`. The top-level `_links`
        object may contain pagination links (`self`, `next`, `prev`, `first`, `last`, `collection`).
      example:
        _profile: 'https://api.apiture.com/schemas/payments/payees/v1.0.0/profile.json'
        name: payees
        start: 10
        limit: 10
        count: 67
        _links:
          self:
            href: /payments/payees?start=10&limit=10
          first:
            href: /payments/payees?start=0&limit=10
          next:
            href: /payments/payees?start=20&limit=10
          collection:
            href: /payments/payees
        _embedded:
          items:
            - _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
              _profile: 'https://api.apiture.com/schemas/payments/payee/v1.0.0/profile.json'
              type: person
              person:
                firstName: John
                middleName: Daniel
                lastName: Smith
              address:
                addressLine1: 555 N Front Street
                addressLine2: Suite 5555
                city: Wilmington
                regionCode: NC
                postalCode: 28401-5405
                countryCode: US
              createdBy: johnsmith1234
              createdAt: '2020-10-02T11:09:20.375Z'
              updatedAt: '2020-10-02T11:15:25.375Z'
              _embedded:
                wireTransfer:
                  _id: 50086068-7e25-4fc8-aff1-c9b59bc2405d
                  _profile: 'https://api.apiture.com/schemas/payments/payeeWireTransferMethod/v1.0.0/profile.json'
                  institution:
                    name: 3rd Party Bank
                    address:
                      addressLine1: 500 N. Elm St
                      city: Norman
                      regionCode: OK
                      postalCode: '73070'
                      countryCode: US
                    routingNumber: '021000021'
                    forFurtherCreditMemo: 'Attention: John Smith'
                  accountNumber: '9876543210'
              _links:
                self:
                  href: /payments/payees/0399abed-fd3d-4830-a88b-30f38b8a365c
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/collection'
        - properties:
            - _embedded
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: Embedded objects.
          allOf:
            - $ref: '#/components/schemas/payeesEmbeddedObjects'
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        count:
          description: >-
            The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
            is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
            filter.
          type: integer
        start:
          description: The start index of this page of items.
          type: integer
        limit:
          description: The maximum number of items per page.
          type: integer
        name:
          description: The name of the collection.
          type: string
      type: object
      x-apiture-flattened: true
    paymentMethodType:
      title: Payment Method Type (v1.0.0)
      description: |-
        Identifies the payment method of a payment instruction. (The `billPay` and `personToPerson` method are not yet implemented.)

        <strong><code>paymentMethodType</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>wireTransfer</code></strong></td><td>Wire Transfer: High value funds transfers through Fedwire or international wire transfer networks.</td>
            </tr>
        <tr>
            <td><strong><code>billPay</code></strong></td><td>Bill Pay: Pay bills and make other payments through checks or similar electronic funds transfer.</td>
            </tr>
        <tr>
            <td><strong><code>personToPerson</code></strong></td><td>Person To Person: One-time payments to, or requests for payment from, a person via a person-to-person payment network.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `paymentMethodType` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      x-apiture-enum: paymentMethodType
      enum:
        - billPay
        - personToPerson
        - wireTransfer
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    paymentInstructionPaymentMethod:
      title: Payment Instruction Payments Method (v1.0.0)
      description: >-
        Contains the payment method details for a payment instruction. This object may have *only one* payment method (one of the `wireRequest`,
        `billPay` or `personToPerson` objects), as per  the `type`.
      type: object
      required:
        - type
      properties:
        type:
          description: Identifies the type of the payment method for this payment instruction.
          allOf:
            - $ref: '#/components/schemas/paymentMethodType'
        wireTransfer:
          description: 'The details of requesting a wire transfer payment, required if and only if `type` is `witeTransfer`.'
          allOf:
            - $ref: '#/components/schemas/wireTransferPaymentInstruction'
        billPay:
          description: 'The details for paying a payee via the bill pay method, required if and only if `type` is `witeTransfer`.'
          allOf:
            - $ref: '#/components/schemas/billPayPaymentInstruction'
        personToPerson:
          description: 'The details for paying a payee via the person to person method, required if and only if `type` is `personToPerson`.'
          allOf:
            - $ref: '#/components/schemas/personToPersonPaymentInstruction'
      example:
        type: wireTransfer
        wireTransfer:
          _id: 50086068-7e25-4fc8-aff1-c9b59bc2405d
          _profile: 'https://api.apiture.com/schemas/payments/wireTransferRequest/v1.0.0/profile.json'
          institution:
            name: 3rd Party Bank
            address:
              addressLine1: 500 N. Elm St
              city: Norman
              regionCode: OK
              postalCode: '73070'
              countryCode: US
            routingNumber: '021000021'
            forFurtherCreditMemo: 'Attention: John Smith'
          accountNumber: '9876543210'
          attachments:
            - name: invoice-2020-10-01a.pdf
              contentType: application/pdf
              uri: 'https://api.devbank.apiture.com/vault/files/91c28be9-ef79-4b94-a2a0-e0aa9ddcab99/content'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    createPaymentInstruction:
      title: Create Payment Instruction (v1.0.0)
      description: >
        Request body to create a new payment instruction. In addition to the required `payee`, `amount`, and `curency`, the request must contain the
        `apiture:account` link of the account where the payment is debited.



        <h3 class='schema-links' id="createPaymentInstruction-links" >Links</h3>


        Response and request bodies using this <strong><code>createPaymentInstruction</code></strong> schema may contain

        the following <a href='https://developer.apiture.com/docs/concepts/links'>links</a>:


        <table>

        <tr>
          <th>Rel</th><th>Summary</th><th>Method</th>
        </tr>


        <tr>

        <td><strong><code>apiture:account</code></strong></td>

        <td>Account where the payment is debited</td><td><code>GET</code></td>

        </table>
      x-apiture-links:
        - rel: 'apiture:account'
          title: Account where the payment is debited
          method: get
      example:
        _profile: 'https://api.apiture.com/schemas/payments/createPaymentInstruction/v1.0.0/profile.json'
        amount:
          value: '256.50'
          currency: USD
        purpose: Advance consulting fee
        payee:
          _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
          _profile: 'https://api.apiture.com/schemas/payments/payee/v1.0.0/profile.json'
          type: person
          payeeName: John Daniel Smith
          accountName: Premiere Checking
          person:
            firstName: John
            middleName: Daniel
            lastName: Smith
          address:
            addressLine1: 555 N Front Street
            addressLine2: Suite 5555
            city: Wilmington
            regionCode: NC
            postalCode: 28401-5405
            countryCode: US
        paymentMethod:
          type: wireTransfer
          wireTransfer:
            _id: 50086068-7e25-4fc8-aff1-c9b59bc2405d
            _profile: 'https://api.apiture.com/schemas/payments/wireTransferRequest/v1.0.0/profile.json'
            institution:
              name: 3rd Party Bank
              address:
                addressLine1: 500 N. Elm St
                city: Norman
                regionCode: OK
                postalCode: '73070'
                countryCode: US
              routingNumber: '021000021'
              forFurtherCreditMemo: 'Attention: John Smith'
            accountNumber: '9876543210'
            attachments:
              - name: invoice-2020-10-01a.pdf
                contentType: application/pdf
                uri: 'https://api.devbank.apiture.com/vault/files/91c28be9-ef79-4b94-a2a0-e0aa9ddcab99/content'
        _links:
          'apiture:account':
            href: 'https://api.devbank.apiture.com/accounts/accounts/e3743de2-b508-4726-9dbc-d1bc98007dba'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractRequest'
        - properties:
            - amount
            - purpose
            - memo
            - payee
            - paymentMethod
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        amount:
          description: The payment amount.
          allOf:
            - $ref: '#/components/schemas/paymentAmount'
        purpose:
          description: The reason the user gave for making this payment.
          type: string
          maxLength: 500
        memo:
          description: A secondary memo.
          type: string
          maxLength: 500
        payee:
          description: >-
            The recipient or beneficiary of the payment, or for requests for payment, the person or organizaton from which the customer is requesting
            a payment.
          allOf:
            - $ref: '#/components/schemas/payee'
        paymentMethod:
          description: The details of the payment method used in this payment instruction.
          allOf:
            - $ref: '#/components/schemas/paymentInstructionPaymentMethod'
      type: object
      x-apiture-flattened: true
    paymentInstructionState:
      title: Payment Instruction State (v1.0.0)
      description: |-
        The state of a payment instruction.

        <strong><code>paymentInstructionState</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>pending</code></strong></td><td>Pending: A new payment instruction that has not been submitted.</td>
            </tr>
        <tr>
            <td><strong><code>submitted</code></strong></td><td>Submitted: A payment instruction that the user has submitted for processing.</td>
            </tr>
        <tr>
            <td><strong><code>canceled</code></strong></td><td>Canceled: A payment instruction that the user has canceled.</td>
            </tr>
        <tr>
            <td><strong><code>processing</code></strong></td><td>Processing: A payment instruction that the financial institution has processed but which is not yet complete.</td>
            </tr>
        <tr>
            <td><strong><code>rejected</code></strong></td><td>Rejected: A payment instruction that the financial institution has rejected.</td>
            </tr>
        <tr>
            <td><strong><code>completed</code></strong></td><td>Completed: A payment instruction that has completed and debited from the account.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `paymentInstructionState` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      x-apiture-enum: paymentInstructionState
      enum:
        - pending
        - submitted
        - canceled
        - processing
        - rejected
        - completed
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    paymentInstruction:
      title: Payment Instruction (v1.0.0)
      description: >
        Representation of payment instruction resources.



        <h3 class='schema-links' id="paymentInstruction-links" >Links</h3>


        Response and request bodies using this <strong><code>paymentInstruction</code></strong> schema may contain

        the following <a href='https://developer.apiture.com/docs/concepts/links'>links</a>:


        <table>

        <tr>
          <th>Rel</th><th>Summary</th><th>Method</th>
        </tr>


        <tr>

        <td><a href='#op-getPaymentInstruction'><strong><code>self</code></strong></a></td><td>Fetch a representation of this payment
        instruction</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPayee'><strong><code>apiture:payee</code></strong></a></td><td>Fetch a representation of this
        payee</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><strong><code>apiture:account</code></strong></td>

        <td>Account where the payment is debited</td><td><code>GET</code></td>


        <tr>

        <td><a href='#op-getPaymentMethod'><strong><code>apiture:paymentMethodDefinition</code></strong></a></td><td>The definition of the payment
        method used in this payment</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPayeeWireTransferMethod'><strong><code>apiture:wireTransfer</code></strong></a></td><td>The wire transfer data for this
        payment instruction.</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-submitPaymentInstruction'><strong><code>apiture:submit</code></strong></a></td><td>Submit this payment
        instruction</td><td><code>POST</code></td>

        </tr>


        <tr>

        <td><a href='#op-cancelPaymentInstruction'><strong><code>apiture:cancel</code></strong></a></td><td>Cancel this payment
        instruction</td><td><code>POST</code></td>

        </tr>


        <tr>

        <td><a href='#op-processPaymentInstruction'><strong><code>apiture:process</code></strong></a></td><td>Process this payment instruction
        (administrative use)</td><td><code>POST</code></td>

        </tr>


        <tr>

        <td><a href='#op-rejectPaymentInstruction'><strong><code>apiture:reject</code></strong></a></td><td>Reject this payment instruction
        (administrative use)</td><td><code>POST</code></td>

        </tr>


        <tr>

        <td><a href='#op-failPaymentInstruction'><strong><code>apiture:fail</code></strong></a></td><td>Mark this payment instruction as failed
        (administrative use)</td><td><code>POST</code></td>

        </tr>

        </table>
      x-apiture-links:
        - rel: self
          operationId: getPaymentInstruction
        - rel: 'apiture:payee'
          operationId: getPayee
        - rel: 'apiture:account'
          title: Account where the payment is debited
          method: get
        - rel: 'apiture:paymentMethodDefinition'
          operationId: getPaymentMethod
          title: The definition of the payment method used in this payment
          description: The definition of the payment method used in this payment.
        - rel: 'apiture:wireTransfer'
          operationId: getPayeeWireTransferMethod
          title: The wire transfer data for this payment instruction.
          description: The details of the wire transfer if this payment's `paymentMethodType` is `wireTransfer`.
        - rel: 'apiture:submit'
          operationId: submitPaymentInstruction
          title: Submit this payment instruction
        - rel: 'apiture:cancel'
          operationId: cancelPaymentInstruction
          title: Cancel this payment instruction
        - rel: 'apiture:process'
          operationId: processPaymentInstruction
          title: Process this payment instruction (administrative use)
        - rel: 'apiture:reject'
          operationId: rejectPaymentInstruction
          title: Reject this payment instruction (administrative use)
        - rel: 'apiture:fail'
          operationId: failPaymentInstruction
          title: Mark this payment instruction as failed (administrative use)
      example:
        _id: d4e159d4-fffd-4320-aa78-332a26cb3062
        _profile: 'https://api.apiture.com/schemas/payments/paymentInstruction/v1.0.0/profile.json'
        amount:
          value: '5000.00'
          currency: USD
        purpose: Advance consulting fee
        payee:
          _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
          _profile: 'https://api.apiture.com/schemas/payments/payee/v1.0.0/profile.json'
          type: person
          payeeName: John Daniel Smith
          accountName: Premiere Checking
          person:
            firstName: John
            middleName: Daniel
            lastName: Smith
          address:
            addressLine1: 555 N Front Street
            addressLine2: Suite 5555
            city: Wilmington
            regionCode: NC
            postalCode: 28401-5405
            countryCode: US
        state: submitted
        createdBy: johnsmith1234
        createdAt: '2020-10-02T11:09:20.375Z'
        updatedAt: '2020-10-02T11:15:25.375Z'
        expiresAt: '2020-10-05T11:15:25.375Z'
        paymentMethod:
          type: wireTransfer
          wireTransfer:
            _id: 50086068-7e25-4fc8-aff1-c9b59bc2405d
            _profile: 'https://api.apiture.com/schemas/payments/wireTransferRequest/v1.0.0/profile.json'
            institution:
              name: 3rd Party Bank
              address:
                addressLine1: 500 N. Elm St
                city: Norman
                regionCode: OK
                postalCode: '73070'
                countryCode: US
              routingNumber: '021000021'
              forFurtherCreditMemo: 'Attention: John Smith'
            accountNumber: '9876543210'
            attachments:
              - name: invoice-2020-10-01a.pdf
                contentType: application/pdf
                uri: 'https://api.devbank.apiture.com/vault/files/91c28be9-ef79-4b94-a2a0-e0aa9ddcab99/content'
        _links:
          self:
            href: 'https://api.devbank.apiture.com/payments/paymentInstructions/d4e159d4-fffd-4320-aa78-332a26cb3062'
          'apiture:paymentMethod':
            href: 'https://api.devbank.apiture.com/payments/paymentMethods/wireTranfer'
          'apiture:account':
            href: 'https://api.devbank.apiture.com/accounts/accounts/e3743de2-b508-4726-9dbc-d1bc98007dba'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - _id
            - amount
            - purpose
            - memo
            - payeeName
            - accountName
            - payee
            - paymentMethod
            - state
            - createdBy
            - createdAt
            - updatedAt
            - expiresAt
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        _id:
          description: The unique identifier for this payment instruction. This is an immutable opaque string.
          readOnly: true
          type: string
          maxLength: 64
        amount:
          description: The payment amount.
          allOf:
            - $ref: '#/components/schemas/paymentAmount'
        purpose:
          description: The reason the user gave for making this payment.
          type: string
          maxLength: 500
        memo:
          description: A secondary memo.
          type: string
          maxLength: 500
        payeeName:
          description: >-
            The (derived) name of the payee, either the concatenation of `person.firstName`, `person.middleName`, `person.lastName` if the
            `payee.type` is `person`, or the `organization.name` if the payee is an organization.
          type: string
          maxLength: 128
          example: John Daniel Smith
          readOnly: true
        accountName:
          description: >-
            The name of the account where the payment is debited. This is derived from the account named in the `apiture:account` link used when
            creating or updating the payment instruction.
          type: string
          maxLength: 128
          example: Premiere Checking
          readOnly: true
        payee:
          description: 'The recipient of the payment, or for requests for payment, the entity from which the customer id requesting a payment.'
          allOf:
            - $ref: '#/components/schemas/payee'
        paymentMethod:
          description: The details of the payment method used in this payment instruction.
          allOf:
            - $ref: '#/components/schemas/paymentInstructionPaymentMethod'
        state:
          description: >-
            The state of this payment instruction. This is immutable and derived. Use the [`submitPaymentInstruction`](#op-submitPaymentInstruction)
            operation to change a `pending` request to `submitted. Administrative applications use other operations to change the state from
            `submitted` to `processing`, `completed`, or `rejected`.
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/paymentInstructionState'
        createdBy:
          description: The unique User Id of the person who created the payment instruction. This is derived and immutable.
          type: string
          readOnly: true
        createdAt:
          description: >-
            The date-time the customer created this payment instruction. This is in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, UTC. This
            is derived and immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
        updatedAt:
          description: >-
            The date-time the payee last updated this payment. This is in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, UTC. This is derived
            and immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
        expiresAt:
          description: >-
            The date-time the payee last updated this payment instruction. This is in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, UTC.
            This is derived and immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
      type: object
      x-apiture-flattened: true
    paymentInstructionsEmbeddedObjects:
      title: Payment Instructions Embedded Objects (v1.0.0)
      description: 'The items in the [`paymentInstructions`](#schema-paymentInstructions) collection.'
      type: object
      properties:
        items:
          description: An array containing a page of payment instructions.
          type: array
          items:
            $ref: '#/components/schemas/paymentInstruction'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    paymentInstructions:
      title: Payment Instruction Collection (v1.0.0)
      description: >-
        Collection of payment instructions. The items in the collection are ordered in the `_embedded.items` array; the `name` is
        `paymentInstructions`. The top-level `_links` object may contain pagination links (`self`, `next`, `prev`, `first`, `last`, `collection`).
      example:
        _profile: 'https://api.apiture.com/schemas/payments/paymentInstructions/v1.0.0/profile.json'
        name: paymentInstructions
        start: 10
        limit: 10
        count: 67
        _links:
          self:
            href: /payments/paymentInstructions?start=10&limit=10
          first:
            href: /payments/paymentInstructions?start=0&limit=10
          next:
            href: /payments/paymentInstructions?start=20&limit=10
          collection:
            href: /payments/paymentInstructions
        _embedded:
          items:
            - _id: d4e159d4-fffd-4320-aa78-332a26cb3062
              _profile: 'https://api.apiture.com/schemas/payments/paymentInstruction/v1.0.0/profile.json'
              amount:
                value: '5000.00'
                currency: USD
              purpose: Advance consulting fee
              payee:
                _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
                _profile: 'https://api.apiture.com/schemas/payments/payee/v1.0.0/profile.json'
                type: person
                payeeName: John Daniel Smith
                accountName: Premiere Checking
                person:
                  firstName: John
                  middleName: Daniel
                  lastName: Smith
                address:
                  addressLine1: 555 N Front Street
                  addressLine2: Suite 5555
                  city: Wilmington
                  regionCode: NC
                  postalCode: 28401-5405
                  countryCode: US
              paymentMethod:
                type: wireTransfer
                wireTransfer:
                  _id: 50086068-7e25-4fc8-aff1-c9b59bc2405d
                  _profile: 'https://api.apiture.com/schemas/payments/wireTransferRequest/v1.0.0/profile.json'
                  institution:
                    name: 3rd Party Bank
                    address:
                      addressLine1: 500 N. Elm St
                      city: Norman
                      regionCode: OK
                      postalCode: '73070'
                      countryCode: US
                    routingNumber: '021000021'
                    forFurtherCreditMemo: 'Attention: John Smith'
                  accountNumber: '9876543210'
                  attachments:
                    - name: invoice-2020-10-01a.pdf
                      contentType: application/pdf
                      uri: 'https://api.devbank.apiture.com/vault/files/91c28be9-ef79-4b94-a2a0-e0aa9ddcab99/content'
              state: submitted
              createdBy: johnsmith1234
              createdAt: '2020-10-02T11:09:20.375Z'
              updatedAt: '2020-10-02T11:15:25.375Z'
              expiresAt: '2020-10-05T11:15:25.375Z'
              _links:
                self:
                  href: 'https://api.devbank.apiture.com/payments/paymentInstructions/d4e159d4-fffd-4320-aa78-332a26cb3062'
                'apiture:paymentMethod':
                  href: 'https://api.devbank.apiture.com/payments/paymentMethods/wireTranfer'
                'apiture:account':
                  href: 'https://api.devbank.apiture.com/accounts/accounts/e3743de2-b508-4726-9dbc-d1bc98007dba'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/collection'
        - properties:
            - _embedded
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: The list of payment instructions in this page of results.
          allOf:
            - $ref: '#/components/schemas/paymentInstructionsEmbeddedObjects'
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        count:
          description: >-
            The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
            is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
            filter.
          type: integer
        start:
          description: The start index of this page of items.
          type: integer
        limit:
          description: The maximum number of items per page.
          type: integer
        name:
          description: The name of the collection.
          type: string
      type: object
      x-apiture-flattened: true
    paymentState:
      title: Payment State (v1.0.0)
      description: |-
        The final state of the executed payment instructions.

        <strong><code>paymentState</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>completed</code></strong></td><td>Completed: The financial institution processed and completed the payment.</td>
            </tr>
        <tr>
            <td><strong><code>failed</code></strong></td><td>Failed: The financial institution failed to execute the payment. For example, the account may not have had sufficient funds at the time the financial institution attempted to process the payment.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `paymentState` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      x-apiture-enum: paymentState
      enum:
        - completed
        - failed
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    summaryPayment:
      title: Summary Payment (v1.0.0)
      description: >
        Summary representation of completed payments used in the [`paymentHistory`](#schema-paymentHistory) collection's `items`. Use
        [`getPayment`](#op-getPayment) (`GET` of the `self` link's `href`) to get the [complete `payment` representation](#schema-payment)of this
        payment. Payment resources are immutable.



        <h3 class='schema-links' id="summaryPayment-links" >Links</h3>


        Response and request bodies using this <strong><code>summaryPayment</code></strong> schema may contain

        the following <a href='https://developer.apiture.com/docs/concepts/links'>links</a>:


        <table>

        <tr>
          <th>Rel</th><th>Summary</th><th>Method</th>
        </tr>


        <tr>

        <td><a href='#op-getPayment'><strong><code>self</code></strong></a></td><td>Fetch a representation of this
        payment</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPayee'><strong><code>apiture:payee</code></strong></a></td><td>The payee associated with this
        payment</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPaymentInstruction'><strong><code>apiture:paymentInstruction</code></strong></a></td><td>Corresponding payment
        instruction</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><strong><code>apiture:account</code></strong></td>

        <td>Account where the payment is debited</td><td><code>GET</code></td>


        <tr>

        <td><a href='#op-getPaymentMethod'><strong><code>apiture:paymentMethodDefinition</code></strong></a></td><td>The definition of the payment
        method used in this payment</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPayeeWireTransferMethod'><strong><code>apiture:wireTransfer</code></strong></a></td><td>The wire transfer data for this
        payment instruction</td><td><code>GET</code></td>

        </tr>

        </table>
      x-apiture-links:
        - rel: self
          operationId: getPayment
        - rel: 'apiture:payee'
          operationId: getPayee
          title: The payee associated with this payment
        - rel: 'apiture:paymentInstruction'
          operationId: getPaymentInstruction
          title: Corresponding payment instruction
          description: The corresponding payment instruction which user submitted and which the financial institution processed to execute this payment
        - rel: 'apiture:account'
          title: Account where the payment is debited
          method: get
        - rel: 'apiture:paymentMethodDefinition'
          operationId: getPaymentMethod
          title: The definition of the payment method used in this payment
        - rel: 'apiture:wireTransfer'
          operationId: getPayeeWireTransferMethod
          title: The wire transfer data for this payment instruction
          description: The details of the wire transfer instructions. This link is present only if this payment's `paymentMethod.type` is `wireTransfer`.
      example:
        _id: d4e159d4-fffd-4320-aa78-332a26cb3062
        _profile: 'https://api.apiture.com/schemas/payments/summaryPayment/v1.0.0/profile.json'
        amount:
          value: '256.50'
          currency: USD
        payeeName: John Daniel Smith
        paymentMethodType: wireTransfer
        state: completed
        createdBy: johnsmith1234
        createdAt: '2020-10-02T11:09:20.375Z'
        completedAt: '2020-10-02T11:15:25.375Z'
        _links:
          self:
            href: 'https://api.devbank.apiture.com/payments/paymentInstructions/d4e159d4-fffd-4320-aa78-332a26cb3062'
          'apiture:paymentInstruction':
            href: 'https://api.devbank.apiture.com/payments/paymentInstructions/d4e159d4-fffd-4320-aa78-332a26cb3062'
          'apiture:paymentMethodDefinition':
            href: 'https://api.devbank.apiture.com/payments/paymentMethods/wireTranfer'
          'apiture:account':
            href: 'https://api.devbank.apiture.com/accounts/accounts/e3743de2-b508-4726-9dbc-d1bc98007dba'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - _id
            - purpose
            - memo
            - payeeName
            - accountName
            - paymentMethodType
            - amount
            - state
            - createdAt
            - completedAt
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        _id:
          description: The unique identifier for this payment. This is an immutable opaque string.
          readOnly: true
          type: string
          maxLength: 64
        purpose:
          description: The reason the user gave for making this payment.
          type: string
          maxLength: 500
        memo:
          description: A secondary memo.
          type: string
          maxLength: 500
        payeeName:
          description: >-
            The name of the payee, either the concatenation of `person.firstName`, `person.middleName`, `person.lastName` if the `payee.type` is
            `person`, or the `organization.name` if the payee is an organization.
          type: string
          maxLength: 128
          example: John Daniel Smith
        accountName:
          description: >-
            The name of the account where the payment is debited. This is derived from the account named in the `apiture:account` link used when
            creating or updating the payment instruction.
          type: string
          maxLength: 128
          example: Premiere Checking
        paymentMethodType:
          description: 'The type of the payment. This is the `type` of the [`paymentMethodDefinition`](#schema-paymentMethodDefinition).'
          allOf:
            - $ref: '#/components/schemas/paymentMethodType'
        amount:
          description: The payment amount.
          allOf:
            - $ref: '#/components/schemas/paymentAmount'
        state:
          description: The final state of this executed payment.
          allOf:
            - $ref: '#/components/schemas/paymentState'
        createdAt:
          description: >-
            The date-time the system created this payment. This is in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, UTC. This is derived and
            immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
        completedAt:
          description: >-
            The date-time the payment was completed. This is in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, UTC. This is derived and
            immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
      type: object
      x-apiture-flattened: true
    payment:
      title: Payment (v1.0.0)
      description: >
        Representation of completed payments, as found in the payment [history](#op-getHistory). Each [submitted payment
        instruction](#op-submitPaymentInstruction) results in a payment resource. Payment instructions with a recurring schedule result in multiple
        payment resources. Payment resources are immutable.



        <h3 class='schema-links' id="payment-links" >Links</h3>


        Response and request bodies using this <strong><code>payment</code></strong> schema may contain

        the following <a href='https://developer.apiture.com/docs/concepts/links'>links</a>:


        <table>

        <tr>
          <th>Rel</th><th>Summary</th><th>Method</th>
        </tr>


        <tr>

        <td><a href='#op-getPayment'><strong><code>self</code></strong></a></td><td>Fetch a representation of this
        payment</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPayee'><strong><code>apiture:payee</code></strong></a></td><td>The payee associated with this
        payment</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPaymentInstruction'><strong><code>apiture:paymentInstruction</code></strong></a></td><td>Corresponding payment
        instruction</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><strong><code>apiture:account</code></strong></td>

        <td>Account where the payment is debited</td><td><code>HET</code></td>


        <tr>

        <td><a href='#op-getPaymentMethod'><strong><code>apiture:paymentMethodDefinition</code></strong></a></td><td>The definition of the payment
        method used in this payment</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getPayeeWireTransferMethod'><strong><code>apiture:wireTransfer</code></strong></a></td><td>The wire transfer data for this
        payment instruction.</td><td><code>GET</code></td>

        </tr>

        </table>
      x-apiture-links:
        - rel: self
          operationId: getPayment
        - rel: 'apiture:payee'
          operationId: getPayee
          title: The payee associated with this payment
        - rel: 'apiture:paymentInstruction'
          operationId: getPaymentInstruction
          title: Corresponding payment instruction
          description: The corresponding payment instruction that user submitted and that the financial institution processed to execute this payment.
        - rel: 'apiture:account'
          title: Account where the payment is debited
          method: het
        - rel: 'apiture:paymentMethodDefinition'
          operationId: getPaymentMethod
          title: The definition of the payment method used in this payment
        - rel: 'apiture:wireTransfer'
          operationId: getPayeeWireTransferMethod
          title: The wire transfer data for this payment instruction.
          description: The details of the wire transfer if this payment's `paymentMethod.type` is `wireTransfer`.
      example:
        _id: d4e159d4-fffd-4320-aa78-332a26cb3062
        _profile: 'https://api.apiture.com/schemas/payments/payment/v1.0.0/profile.json'
        amount:
          value: '256.50'
          currency: USD
        payeeName: John Daniel Smith
        accountName: Premiere Checking
        payee:
          _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
          _profile: 'https://api.apiture.com/schemas/payments/payee/v1.0.0/profile.json'
          type: person
          payeeName: John Daniel Smith
          accountName: Premiere Checking
          person:
            firstName: John
            middleName: Daniel
            lastName: Smith
          address:
            addressLine1: 555 N Front Street
            addressLine2: Suite 5555
            city: Wilmington
            regionCode: NC
            postalCode: 28401-5405
            countryCode: US
        paymentMethod:
          type: wireTransfer
          wireTransfer:
            _id: 50086068-7e25-4fc8-aff1-c9b59bc2405d
            _profile: 'https://api.apiture.com/schemas/payments/wireTransferRequest/v1.0.0/profile.json'
            institution:
              name: 3rd Party Bank
              address:
                addressLine1: 500 N. Elm St
                city: Norman
                regionCode: OK
                postalCode: '73070'
                countryCode: US
              routingNumber: '021000021'
              forFurtherCreditMemo: 'Attention: John Smith'
            accountNumber: '9876543210'
            attachments:
              - name: invoice-2020-10-01a.pdf
                contentType: application/pdf
                uri: 'https://api.devbank.apiture.com/vault/files/91c28be9-ef79-4b94-a2a0-e0aa9ddcab99/content'
        state: completed
        createdBy: johnsmith1234
        createdAt: '2020-10-02T11:09:20.375Z'
        completedAt: '2020-10-02T11:15:25.375Z'
        _links:
          self:
            href: 'https://api.devbank.apiture.com/payments/paymentInstructions/d4e159d4-fffd-4320-aa78-332a26cb3062'
          'apiture:paymentInstruction':
            href: 'https://api.devbank.apiture.com/payments/paymentInstructions/3f9e4f91-f3a1-4bf0-87f1-d12c09b6a46f'
          'apiture:paymentMethodDefinition':
            href: 'https://api.devbank.apiture.com/payments/paymentMethods/wireTranfer'
          'apiture:account':
            href: 'https://api.devbank.apiture.com/accounts/accounts/e3743de2-b508-4726-9dbc-d1bc98007dba'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/summaryPayment'
        - properties:
            - payee
            - paymentMethod
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        _id:
          description: The unique identifier for this payment. This is an immutable opaque string.
          readOnly: true
          type: string
          maxLength: 64
        purpose:
          description: The reason the user gave for making this payment.
          type: string
          maxLength: 500
        memo:
          description: A secondary memo.
          type: string
          maxLength: 500
        payeeName:
          description: >-
            The name of the payee, either the concatenation of `person.firstName`, `person.middleName`, `person.lastName` if the `payee.type` is
            `person`, or the `organization.name` if the payee is an organization.
          type: string
          maxLength: 128
          example: John Daniel Smith
        accountName:
          description: >-
            The name of the account where the payment is debited. This is derived from the account named in the `apiture:account` link used when
            creating or updating the payment instruction.
          type: string
          maxLength: 128
          example: Premiere Checking
        paymentMethodType:
          description: 'The type of the payment. This is the `type` of the [`paymentMethodDefinition`](#schema-paymentMethodDefinition).'
          allOf:
            - $ref: '#/components/schemas/paymentMethodType'
        amount:
          description: The payment amount.
          allOf:
            - $ref: '#/components/schemas/paymentAmount'
        state:
          description: The final state of this executed payment.
          allOf:
            - $ref: '#/components/schemas/paymentState'
        createdAt:
          description: >-
            The date-time the system created this payment. This is in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, UTC. This is derived and
            immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
        completedAt:
          description: >-
            The date-time the payment was completed. This is in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, UTC. This is derived and
            immutable.
          type: string
          readOnly: true
          format: date-time
          example: '2020-09-30T12:19:37.375Z'
        payee:
          description: 'The recipient of the payment, or for requests for payment, the entity from which the customer is requesting a payment.'
          allOf:
            - $ref: '#/components/schemas/payee'
        paymentMethod:
          description: The details of the payment method used in to make this payment.
          allOf:
            - $ref: '#/components/schemas/paymentInstructionPaymentMethod'
      type: object
      x-apiture-flattened: true
    paymentHistoryEmbeddedObjects:
      title: Payment History Embedded Objects (v1.0.0)
      description: 'The items in the [`paymentHistory`](#schema-paymentHistory) collection.'
      type: object
      properties:
        items:
          description: An array containing a page of payments.
          type: array
          items:
            $ref: '#/components/schemas/summaryPayment'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    paymentHistory:
      title: Payment History (v1.0.0)
      description: |-
        A collection of completed payments.
        This collection does not contain pending, submitted, or rejected payments,
        which are found in the [`getPaymentInstructions` operation](#op-getPaymentInstruction)'s
        [`paymentInstructions` collection](#schema-paymentInstructions) response.


        The items in the collection are ordered in the
        `_embedded.items` array; the `name` is `history`. The top-level `_links`
        object may contain pagination links (`self`, `next`, `prev`, `first`,
        `last`, `collection`).
      example:
        _profile: 'https://api.apiture.com/schemas/payments/paymentHistory/v1.0.0/profile.json'
        name: history
        start: 10
        limit: 10
        count: 67
        _links:
          self:
            href: /payments/history?start=10&limit=10
          first:
            href: /payments/history?start=0&limit=10
          next:
            href: /payments/history?start=20&limit=10
          collection:
            href: /payments/history
        _embedded:
          items:
            - _id: 3a0b0818-93d2-448d-a7d8-ed526f6ba80d
              _profile: 'https://api.apiture.com/schemas/payments/summaryPayment/v1.0.0/profile.json'
              amount:
                value: '256.50'
                currency: USD
              payeeName: John Daniel Smith
              accountName: Premiere Checking
              paymentMethodType: wireTransfer
              state: submitted
              createdBy: johnsmith1234
              createdAt: '2020-10-02T11:09:20.375Z'
              completedAt: '2020-10-02T11:15:25.375Z'
              _links:
                self:
                  href: 'https://api.devbank.apiture.com/payments/paymentInstructions/3a0b0818-93d2-448d-a7d8-ed526f6ba80d'
                'apiture:paymentInstruction':
                  href: 'https://api.devbank.apiture.com/payments/paymentInstructions/3a0b0818-93d2-448d-a7d8-ed526f6ba80d'
                'apiture:paymentMethod':
                  href: 'https://api.devbank.apiture.com/payments/paymentMethods/wireTranfer'
                'apiture:account':
                  href: 'https://api.devbank.apiture.com/accounts/accounts/e3743de2-b508-4726-9dbc-d1bc98007dba'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/collection'
        - properties:
            - _embedded
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: The list of payment in this page of results.
          allOf:
            - $ref: '#/components/schemas/paymentHistoryEmbeddedObjects'
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        count:
          description: >-
            The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
            is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
            filter.
          type: integer
        start:
          description: The start index of this page of items.
          type: integer
        limit:
          description: The maximum number of items per page.
          type: integer
        name:
          description: The name of the collection.
          type: string
      type: object
      x-apiture-flattened: true
    errorResponse:
      x-apiture-version: 2.0.0
      title: Error Response (v2.0.0)
      description: |-
        Describes an error response, typically returned on 4xx or 5xx errors from API operations. The `_error` object contains the error details.

        This schema was resolved from [`common/errorResponse`](https://production.api.apiture.com/schemas/common/errorResponse/v2.0.0/model.json).
      example:
        _profile: 'https://api.apiture.com/schemas/common/errorResponse/v2.0.0/profile.json'
        _error:
          _id: 2eae46e1-575c-4d69-8a8f-0a7b0115a4b3
          message: The value for deposit must be greater than 0.
          statusCode: 422
          type: positiveNumberRequired
          attributes:
            value: -125.5
          remediation: Provide a value which is greater than 0
          occurredAt: '2018-01-25T05:50:52.375Z'
          _links:
            describedby:
              href: 'https://api.apiture.com/errors/positiveNumberRequired'
          _embedded:
            errors: []
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/errorResponse/v2.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
      type: object
      x-apiture-flattened: true
    labelGroups:
      title: Label Groups (v1.0.1)
      description: >-
        A set of named groups of labels, each of which contains multiple item labels.


        The abbreviated example shows two groups, one named `structure` and one named `estimatedAnnualRevenue`. The first has items with names such as
        `corporation`, `llc` and `soleProprietorship`, with text labels for each in the default and in French. The second has items for estimated
        revenue *ranges* but no localized labels. For example, the item named `from1to10Million` has the `label` "$1M to $10M" and the range
        `[1000000.00,10000000.00)`.


        This schema was resolved from [`common/labelGroups`](https://production.api.apiture.com/schemas/common/labelGroups/v1.0.1/model.json).
      x-apiture-version: 1.0.1
      example:
        _profile: 'https://api.apiture.com/schemas/common/labelGroups/v1.0.1/profile.json'
        groups:
          structure:
            unknown:
              label: Unknown
              code: '0'
              hidden: true
            corporation:
              label: Corporation
              code: '1'
              variants:
                fr:
                  label: Soci\u00e9t\u00e9
            partnership:
              label: Partnership
              code: '2'
              variants:
                fr:
                  label: Partenariat
            llc:
              label: Limited Liability Company
              code: '2'
              variants:
                fr:
                  label: Soci\u00e9t\u00e9 \u00e9 Responsabilit\u00e9 Limit\u00e9e
            nonProfit:
              label: Non Profit
              code: '4'
              variants:
                fr:
                  label: Non Lucratif
            financialInstitution:
              label: Financial Institution
              code: '8'
              variants:
                fr:
                  label: Institution financi\u00e8re
            soleProprietorship:
              label: Sole Proprietorship
              code: '11'
              variants:
                fr:
                  label: Entreprise individuelle
            other:
              label: Other
              code: '254'
              variants:
                fr:
                  label: Autre
          estimatedAnnualRevenue:
            unknown:
              label: Unknown
              code: '0'
            under1Million:
              label: Under $1M
              code: '1'
              range: '[0,1000000.00)'
            from1to10Million:
              label: $1M to $10M
              code: '2'
              range: '[1000000.00,10000000.00)'
            from10to100Million:
              label: $10M to $100M
              code: '3'
              range: '[10000000.00,100000000.00)'
            over100Million:
              label: 'Over $100,000,000.00'
              code: '4'
              range: '[100000000.00,]'
            other:
              label: Other
              code: '254'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/labelGroups/v1.0.1/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - groups
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        groups:
          description: 'Groups of localized labels. This maps *group names* &rarr; [*a group of labels*](#schema-labelgroup) within that group.'
          x-apiture-key: groupName
          additionalProperties:
            $ref: '#/components/schemas/labelGroup'
      type: object
      x-apiture-flattened: true
    root:
      x-apiture-version: 2.0.1
      title: API Root (v2.0.1)
      description: |-
        A HAL response, with hypermedia `_links` for the top-level resources and operations in API.

        This schema was resolved from [`common/root`](https://production.api.apiture.com/schemas/common/root/v2.0.1/model.json).
      example:
        id: apiName
        name: API name
        apiVersion: 1.0.0
        _profile: 'https://api.apiture.com/schemas/common/root/v2.0.1/profile.json'
        _links: {}
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/root/v2.0.1/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - _id
            - name
            - apiVersion
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        _id:
          description: This API's unique ID.
          readOnly: true
          type: string
        name:
          type: string
          description: This API's name.
        apiVersion:
          type: string
          description: This API's version.
      type: object
      x-apiture-flattened: true
    challengeErrorResponse:
      title: Challenge Error Response (v1.0.1)
      description: >-
        When an operation requires an additional identity verification challenge, it returns a 401 Unauthorized response status code and an error
        response with a challenge resource embedded in the `_error._embedded.challenge`. This informs the caller that they should verify the challenge
        via one or more of its `authenticators`, then retry the operation with the `Apiture-Challenge` header that references the challenge's `_id`.


        This schema was resolved from
        [`auth/challengeErrorResponse`](https://production.api.apiture.com/schemas/auth/challengeErrorResponse/v1.0.1/model.json).
      x-apiture-version: 1.0.1
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/challengeErrorResponse/v1.0.1/model.json'
      x-apiture-namespace: auth
      x-apiture-composition:
        - $ref: '#/components/schemas/errorResponse'
        - properties:
            - _error
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: The description of the error.
          type: object
          allOf:
            - $ref: '#/components/schemas/challengeError'
      type: object
      x-apiture-flattened: true
    abstractResource:
      x-apiture-version: 2.0.0
      title: Abstract Resource (v2.0.0)
      description: >-
        An abstract schema used to define other schemas for request and response bodies. This is a
        [HAL](https://tools.ietf.org/html/draft-kelly-json-hal-08) resource representation. This model contains hypermedia `_links`, and either
        optional domain object data with `_profile` and optional `_embedded` objects, or an `_error` object. In responses, if the operation was
        successful, this object will not include the `_error`, but if the operation was a 4xx or 5xx error, this object will not include `_embedded`
        or any data fields, only `_error` and optionally `_links`.


        This schema was resolved from
        [`common/abstractResource`](https://production.api.apiture.com/schemas/common/abstractResource/v2.0.0/model.json).
      example:
        _profile: 'https://production.api.apiture.com/schemas/common/abstractResource/v2.0.0/profile.json'
        _links:
          self:
            href: 'https://api.devbank.apiture.com/applications/application/328f6bf6-d762-422f-a077-ab91ca4d0b6f'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/abstractResource/v2.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractRequest'
        - properties:
            - _error
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
      type: object
      x-apiture-flattened: true
    collection:
      x-apiture-version: 2.0.0
      title: Collection (v2.0.0)
      description: |-
        A collection of resources. This is an abstract model schema which is extended to define specific resource collections.

        This schema was resolved from [`common/collection`](https://production.api.apiture.com/schemas/common/collection/v2.0.0/model.json).
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/collection/v2.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - count
            - start
            - limit
            - name
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        count:
          description: >-
            The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
            is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
            filter.
          type: integer
        start:
          description: The start index of this page of items.
          type: integer
        limit:
          description: The maximum number of items per page.
          type: integer
        name:
          description: The name of the collection.
          type: string
      type: object
      x-apiture-flattened: true
    contactName:
      title: Name (v1.0.0)
      description: |-
        A person's name.

        This schema was resolved from [`contacts/contactName`](https://production.api.apiture.com/schemas/contacts/contactName/v1.0.0/model.json).
      x-apiture-fragment: true
      properties:
        firstName:
          description: The person's first name (or given name).
          type: string
        middleName:
          description: The person's middle name.
          type: string
        lastName:
          description: The person's last name (or surname).
          type: string
      example:
        firstName: John
        middleName: Daniel
        lastName: Smith
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/contacts/contactName/v1.0.0/model.json'
      x-apiture-namespace: contacts
      type: object
      x-apiture-flattened: true
    simpleAddress:
      title: Simple Address (v1.0.0)
      description: |-
        A postal address.

        This schema was resolved from [`contacts/simpleAddress`](https://production.api.apiture.com/schemas/contacts/simpleAddress/v1.0.0/model.json).
      type: object
      properties:
        addressLine1:
          description: 'The first street address line of the address, normally a house number and street name.'
          type: string
          minLength: 4
          maxLength: 128
        addressLine2:
          description: The optional second street address line of the address.
          type: string
          maxLength: 128
        city:
          description: The name of the city or municipality.
          type: string
          minLength: 2
          maxLength: 128
        regionCode:
          description: 'The mailing address region code, such as state in the US, or a province in Canada. This is normalized to uppercase.'
          type: string
          example: NC
          minLength: 2
          maxLength: 2
          pattern: '^[a-zA-Z]{2}$'
        postalCode:
          description: 'The mailing address postal code, such as a US Zip or Zip+4 code, or a Canadian postal code.'
          type: string
          example: 28401-5405
          minLength: 5
          maxLength: 10
          pattern: '^[0-9]{5}(?:-[0-9]{4})?$'
        countryCode:
          description: 'The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. This is normalized to uppercase.'
          type: string
          minLength: 2
          maxLength: 2
          pattern: '^[a-zA-Z]{2}$'
      example:
        addressLine1: 555 N Front Street
        addressLine2: Suite 5555
        city: Wilmington
        regionCode: NC
        postalCode: 28401-5405
        countryCode: US
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/contacts/simpleAddress/v1.0.0/model.json'
      x-apiture-namespace: contacts
      x-apiture-flattened: true
    abstractRequest:
      x-apiture-version: 2.0.0
      title: Abstract Request (v2.0.0)
      description: >-
        An abstract schema used to define other request-only schemas. This is a [HAL](https://tools.ietf.org/html/draft-kelly-json-hal-08) resource
        representation, minus the `_error` defined in `abstractResource`.


        This schema was resolved from [`common/abstractRequest`](https://production.api.apiture.com/schemas/common/abstractRequest/v2.0.0/model.json).
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
      example:
        _profile: 'https://api.apiture.com/schemas/common/abstractRequest/v2.0.0/profile.json'
        _links:
          self:
            href: 'https://api.devbank.apiture.com/applications/'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/abstractRequest/v2.0.0/model.json'
      x-apiture-namespace: common
      type: object
      x-apiture-flattened: true
    labelGroup:
      title: Label Group (v1.0.0)
      description: >-
        A map that defines labels for the items in a group. This is a map from each item *name* &rarr; *a [`labelItem`](#schema-labelitem) object*.
        For example, consider a JSON response that includes a property named `revenueEstimate`; the values for `revenueEstimate` must be one of the
        items in the group named `estimatedAnnualRevenue`, with options ranging `under1Million`, to `over100Million`. The item name is used as the
        selected value in an Apiture representation, such as `{ ..., "revenueEstimate" : "from10to100Million" , ...}`, and the item with the name
        `from10to100Million` defines the presentation labels for that item, as well as other metadata about that choice: this is the range
        `[10000000.00,100000000.00)`.


        This allows the client to let the user select a value from a list, such as the following derivde from the labels in the example:

          * Unknown
          * Under $1M
          * $1M to $10M
          * $10M to $100M
          * $100M or more

        Note that the `other` item is hidden from the selection list, as that item is marked as `hidden`. For items which define numeric ranges, a
        client may instead let the customer *directly* enter their estimated annual revenue as a number, such as 4,500,000.00. The client can then
        match that number to one of ranges in the items and set the `revenueEstimate` to the corresponding item's name: `{ ..., "revenueEstimate" :
        "from1to10Million", ... }`.


        This schema was resolved from [`common/labelGroup`](https://production.api.apiture.com/schemas/common/labelGroup/v1.0.0/model.json).
      x-apiture-key: labelName
      x-apiture-version: 1.0.0
      additionalProperties:
        $ref: '#/components/schemas/labelItem'
      example:
        unknown:
          label: Unknown
          code: '0'
          hidden: true
        under1Million:
          label: Under $1M
          code: '1'
          range: '[0,1000000.00)'
          variants:
            fr:
              label: Moins de $1M
        from1to10Million:
          label: $1M to $10M
          code: '2'
          range: '[1000000.00,10000000.00)'
          variants:
            fr:
              label: $1M \u00e0 $10M
        from10to100Million:
          label: $10M to $100M
          code: '3'
          range: '[10000000.00,100000000.00)'
          variants:
            fr:
              - label $10M \u00e0 $100M
        over100Million:
          label: 'Over $100,000,000.00'
          code: '4'
          range: '[100000000.00,]'
          variants:
            fr:
              label: Plus de $10M
        other:
          label: Other
          code: 254
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/labelGroup/v1.0.0/model.json'
      x-apiture-namespace: common
      type: object
      properties: {}
      x-apiture-flattened: true
    error:
      x-apiture-version: 2.0.0
      title: Error (v2.0.0)
      description: |-
        Describes an error in an API request or in a service called via the API.

        This schema was resolved from [`common/error`](https://production.api.apiture.com/schemas/common/error/v2.0.0/model.json).
      required:
        - message
      properties:
        message:
          type: string
          description: A localized message string describing the error condition.
        _id:
          description: >-
            A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at
            the source of the error). This is is an opaque string.
          readOnly: true
          type: string
        statusCode:
          description: The HTTP status code associate with this error.
          type: integer
          minimum: 100
          maximum: 599
          example: 422
        type:
          type: string
          description: >-
            An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to
            render an appropriate message or hint. This provides a finer level of granularity than the `statusCode`. For example, instead of just 400
            Bad Request, the `type` may be much more specific. such as `integerValueNotInAllowedRange` or `numericValueExceedsMaximum` or
            `stringValueNotInAllowedSet`.
        occurredAt:
          type: string
          format: date-time
          description: 'An [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC time stamp indicating when the error occurred.'
          example: '2018-02-02T03:37:15.375Z'
        attributes:
          description: >-
            Informative values or constraints which describe the error. For example, for a value out of range error, the attributes may specify the
            `minimum` and `maximum` values. This allows clients to present error messages as they see fit (the API does not assume the
            client/presentation tier). The set of attributes varies by error `type`.
          allOf:
            - $ref: '#/components/schemas/attributes'
        remediation:
          type: string
          description: An optional localized string which provides hints for how the user or client can resolve the error.
        errors:
          description: An optional array of nested error objects. This property is not always present.
          type: array
          items:
            $ref: '#/components/schemas/error'
        _links:
          $ref: '#/components/schemas/links'
      example:
        _id: 2eae46e1575c0a7b0115a4b3
        message: Descriptive error message...
        statusCode: 422
        type: errorType1
        remediation: Remediation string...
        occurredAt: '2018-01-25T05:50:52.375Z'
        errors:
          - _id: ccdbe2c5c938a230667b3827
            message: An optional embedded error
          - _id: dbe9088dcfe2460f229338a3
            message: Another optional embedded error
        _links:
          describedby:
            href: 'https://developer.apiture.com/errors/errorType1'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/error/v2.0.0/model.json'
      x-apiture-namespace: common
      type: object
      x-apiture-flattened: true
    links:
      title: Links (v1.0.0)
      x-apiture-version: 1.0.0
      description: |-
        An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.

        This schema was resolved from [`common/links`](https://production.api.apiture.com/schemas/common/links/v1.0.0/model.json).
      type: object
      x-apiture-key: linkRelationName
      additionalProperties:
        $ref: '#/components/schemas/link'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/links/v1.0.0/model.json'
      x-apiture-namespace: common
      properties: {}
      x-apiture-flattened: true
    challengeError:
      title: Challenge Error (v1.0.0)
      description: |-
        The operation error description with an embedded identity challenge.

        This schema was resolved from [`auth/challengeError`](https://production.api.apiture.com/schemas/auth/challengeError/v1.0.0/model.json).
      type: object
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/challengeError/v1.0.0/model.json'
      x-apiture-namespace: auth
      x-apiture-composition:
        - $ref: '#/components/schemas/error'
        - properties:
            - _embedded
      properties:
        message:
          type: string
          description: A localized message string describing the error condition.
        _id:
          description: >-
            A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at
            the source of the error). This is is an opaque string.
          readOnly: true
          type: string
        statusCode:
          description: The HTTP status code associate with this error.
          type: integer
          minimum: 100
          maximum: 599
          example: 422
        type:
          type: string
          description: >-
            An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to
            render an appropriate message or hint. This provides a finer level of granularity than the `statusCode`. For example, instead of just 400
            Bad Request, the `type` may be much more specific. such as `integerValueNotInAllowedRange` or `numericValueExceedsMaximum` or
            `stringValueNotInAllowedSet`.
        occurredAt:
          type: string
          format: date-time
          description: 'An [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC time stamp indicating when the error occurred.'
          example: '2018-02-02T03:37:15.375Z'
        attributes:
          description: >-
            Informative values or constraints which describe the error. For example, for a value out of range error, the attributes may specify the
            `minimum` and `maximum` values. This allows clients to present error messages as they see fit (the API does not assume the
            client/presentation tier). The set of attributes varies by error `type`.
          allOf:
            - $ref: '#/components/schemas/attributes'
        remediation:
          type: string
          description: An optional localized string which provides hints for how the user or client can resolve the error.
        errors:
          description: An optional array of nested error objects. This property is not always present.
          type: array
          items:
            $ref: '#/components/schemas/error'
        _links:
          $ref: '#/components/schemas/links'
        _embedded:
          description: Embedded objects
          type: object
          properties:
            challenge:
              description: The details of the identity verification challenge.
              allOf:
                - $ref: '#/components/schemas/challenge'
      x-apiture-flattened: true
    attributes:
      x-apiture-version: 2.0.0
      title: Attributes (v2.0.0)
      description: |-
        An optional map of name/value pairs which contains additional dynamic data about the resource.

        This schema was resolved from [`common/attributes`](https://production.api.apiture.com/schemas/common/attributes/v2.0.0/model.json).
      type: object
      x-apiture-key: attributeName
      additionalProperties:
        $ref: '#/components/schemas/attributeValue'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/attributes/v2.0.0/model.json'
      x-apiture-namespace: common
      properties: {}
      x-apiture-flattened: true
    link:
      x-apiture-version: 1.0.0
      title: Link (v1.0.0)
      description: >-
        Describes a hypermedia link within a `_links` object in HAL representations. In Apiture APIs, links are [HAL
        links](https://developer.apiture.com/docs/concepts/links), but Apiture APIs do not use the `name` or `hreflang` properties of HAL. Apiture
        links _may_ include a `method` property.


        This schema was resolved from [`common/link`](https://production.api.apiture.com/schemas/common/link/v1.0.0/model.json).
      required:
        - href
      properties:
        href:
          type: string
          format: uri
          description: The URI or URI template for the resource/operation this link refers to.
        type:
          type: string
          description: The media type for the resource.
        templated:
          type: boolean
          description: 'If true, the link''s href is a [URI template](https://tools.ietf.org/html/rfc6570).'
        title:
          type: string
          description: An optional human-readable localized title for the link.
        deprecation:
          type: string
          format: uri
          description: 'If present, the containing link is deprecated and the value is a URI which provides human-readable text information about the deprecation.'
        profile:
          type: string
          format: uri
          description: 'The URI of a profile document, a JSON document which describes the target resource/operation.'
      example:
        href: 'https://api.devbank.apiture.com/applications/application/328f6bf6-d762-422f-a077-ab91ca4d0b6f'
        title: Application
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/link/v1.0.0/model.json'
      x-apiture-namespace: common
      type: object
      x-apiture-flattened: true
    labelItem:
      title: Label Item (v1.0.0)
      description: >-
        An item in a [`labelGroup`](#schema-labelgroup), with a set of `variants` which contains different localized labels for the item. Each
        ([`simpleLabel`](#schema-simpleLabel)) variant defines the presentation text label and optional description for a language. Items may also
        have a lookup `code` to map to external syststems, a numeric range, and a `hidden` boolean to indicate the item is normally hidden in the UI.


        This schema was resolved from [`common/labelItem`](https://production.api.apiture.com/schemas/common/labelItem/v1.0.0/model.json).
      x-apiture-version: 1.0.0
      example:
        over100Million:
          label: 'Over $100,000,000.00'
          code: '4'
          range: '[100000000.00,]'
          variants:
            fr:
              label: Plus de $10M
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/labelItem/v1.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/simpleLabel'
        - properties:
            - variants
            - code
            - hidden
            - range
      properties:
        label:
          type: string
          description: A label or title which may be used as labels or other UI controls which present a value.
          example: Board of Directors
        description:
          type: string
          description: A more detailed localized description of a localizable label.
        variants:
          description: >-
            The language-specific variants of this label. The keys in this object are [RFC 7231](https://tools.ietf.org/html/rfc7231#section-3.1.3.1)
            language codes.
          x-apiture-key: languageCode
          type: object
          additionalProperties:
            $ref: '#/components/schemas/simpleLabel'
          example:
            en:
              label: More then $10M
            es:
              label: Mas de $10M
            fr:
              label: Plus de $10M
        code:
          type: string
          description: 'If the localized value is associated with an external standard or definition, this is a lookup code or key or URI for that value.'
          example: '3'
          minLength: 1
        hidden:
          type: boolean
          description: 'If `true`, this item is normally hidden from the User Interface.'
        range:
          description: >-
            The range of values, if the item describes a bounded numeric value. This is range notation such as `[min,max]`, `(exclusiveMin,max]`,
            `[min,exclusiveMax)`, or `(exclusiveMin,exclusiveMax)`. For example, `[0,100)` is the range greater than or equal to 0 and less than 100.
            If the *min* or *max* value are omitted, that end of the range is unbounded. For example, `(,1000.00)` means less than 1000.00 and
            `[20000.00,]` means 20000.00 or more. The ranges do not overlap or have gaps.
          type: string
          pattern: '^[\[\(](-?(0|[1-9][0-9]*)(\.[0-9]+)?)?,(-?(0|[1-9][0-9]*)(\.[0-9]+)?)?[\]\)]$'
      type: object
      x-apiture-flattened: true
    challenge:
      title: Challenge (v1.0.1)
      description: >-
        A resource which represents an identity verification challenge to a user. The user must verify one or more of the authentication methods
        defined in this challenge in order to proceed with a banking operation (such as scheduling a larger than normal transfer, adding a joint owner
        or authorized signer to an account, or changing their mailing address or mobile phone number).



        <h3 class='schema-links' id="challenge-links" >Links</h3>


        Response and request bodies using this <strong><code>challenge</code></strong> schema may contain

        the following <a href='https://developer.apiture.com/docs/concepts/links'>links</a>:


        <table>

        <tr>
          <th>Rel</th><th>Summary</th><th>Method</th>
        </tr>


        <tr>

        <td><a href='#op-redeemChallenge'><strong><code>apiture:redeem</code></strong></a></td><td>Redeem or use a
        challenge</td><td><code>POST</code></td>

        </tr>

        </table>



        This schema was resolved from [`auth/challenge`](https://production.api.apiture.com/schemas/auth/challenge/v1.0.1/model.json).
      x-apiture-version: 1.0.1
      example:
        _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
        _profile: 'https://api.apiture.com/schemas/auth/challenge/v1.0.1/profile.json'
        reason: Transfer amount much higher than normal
        contextUri: 'https://fi.apiture.com/transfers/scheduledTransfers/50b9df19-d6bf-4ac0-b5f4-3e6448b7dacd'
        minimumAuthenticatorCount: 1
        authenticators:
          - _id: 7fadd35b-6f6b-4901-b1ba-d3b91c9dcee3
            _profile: 'https://api.apiture.com/schemas/auth/authenticator/v1.0.1/profile.json'
            userId: b2720469-3497-4b82-8b85-30f2155aa66d
            state: started
            type:
              name: sms
              label: SMS Code
              description: Enter a code sent via SMS to the user's preferred mobile device.
              category: device
              schema:
                title: SMS attributes
                description: Schema for an authenticator's `attributes` when the authenticator type is `sms`.
                type: object
                required:
                  - code
                  - length
                properties:
                  code:
                    type: string
                    description: >-
                      A code that was sent to the user's mobile device via SMS. The user should enter the code in the app, then set `attributes.code`
                      to that. The length of the code (the number of characters or digits) must equal the `length'.
                    minLength: 3
                    maxLength: 10
                  length:
                    description: The number of digits/characters that are sent to the user via SMS.
                    type: integer
                    minimum: 3
                    maximum: 10
                    example: 6
            maximumRetries: 3
            retryCount: 1
            createdAt: '2019-08-23T12:42:50.375Z'
            expiresAt: '2019-08-23T13:12:50.375Z'
            _links:
              self:
                href: /auth/challenges/0399abed-fd3d-4830-a88b-30f38b8a365c/authenticators/7fadd35b-6f6b-4901-b1ba-d3b91c9dcee3
              'apiture:challenge':
                href: /auth/challenges/0399abed-fd3d-4830-a88b-30f38b8a365c
              'apiture:retry':
                href: /auth/challenges/retriedAuthenticators?authenticator=7fadd35b-6f6b-4901-b1ba-d3b91c9dcee3
              'apiture:verify':
                href: /auth/challenges/verifiedAuthenticators
        maximumRedemptionCount: 1
        redemptionCount: 0
        state: pending
        createdAt: '2019-08-23T11:37:55.375Z'
        expiresAt: '2019-08-23T12:37:55.375Z'
        _links:
          self:
            href: /auth/challenges/5d63053d-435c-4455-a0b5-6f88ab729d1a
          'apiture:redeem':
            href: /auth/redeemedChallenges?challenge=5d63053d-435c-4455-a0b5-6f88ab729d1a
      x-apiture-links:
        - rel: 'apiture:redeem'
          operationId: redeemChallenge
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/challenge/v1.0.1/model.json'
      x-apiture-namespace: auth
      x-apiture-composition:
        - $ref: '#/components/schemas/summaryChallenge'
        - properties:
            - _id
            - authenticators
            - redeemable
            - verifiedAt
            - failedAt
            - expiresAt
            - redemptionHistory
            - code
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        reason:
          description: >-
            The reason the application or service has issued a challenge requesting the user verify their identity. This is for labeling or
            informational purposes.
          type: string
          x-apiture-todo:
            - Should this be a reasonCode (non-localizable identifier and reason label?
        contextUri:
          description: >-
            The URI of a resource that establishes the context in which the user is asked to authenticate their identity. For example, for this may be
            for a pending transfer, a user's mailing address, or an account if adding a joint owner.
          type: string
          format: uri
          maxLength: 2048
        userId:
          description: >-
            The user ID of the user who is requested to verify their identity. The default is the userID of the authenticated person creating the
            challenge.
          type: string
        minimumAuthenticatorCount:
          description: The minimum number of different authenticators the user must verify in order to satisfy the identity challenge. The default is 1.
          type: integer
          minimum: 0
          maximum: 4
        maximumRedemptionCount:
          description: The maximum number of times the challenge may be used or redeemed. The default is 1.
          type: integer
          minimum: 1
        _id:
          description: The unique identifier for this challenge resource. This is an immutable opaque string assigned upon creation.
          readOnly: true
          type: string
        redemptionCount:
          description: How many times the challenge has been redeemed.
          type: integer
          readOnly: true
        state:
          description: The state of this authenticator.
          allOf:
            - $ref: '#/components/schemas/challengeState'
          readOnly: true
        createdAt:
          description: >-
            The time stamp when challenge was created, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format
            (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
        authenticators:
          description: >-
            An array of authenticators with which the user can verify their identity. This is derived; the array and the authenticators are
            constructed in the `createChallenge` operation.
          type: array
          items:
            $ref: '#/components/schemas/authenticator'
          readOnly: true
        redeemable:
          description: >-
            `true` if and only if the challenge may be redeemed. This is derived from the states of the challenge's authenticators; if the number of
            `verified` authenticators meets or exceeds the `minimumAuthenticatorCount`, the challenge becomes `verified` and may be redeemed via a
            `POST` to href in the challenge's `apiture:redeem` link.
          type: boolean
          readOnly: true
        verifiedAt:
          description: >-
            The time stamp when challenge was verified in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format
            (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
        failedAt:
          description: >-
            The time stamp when the user failed to verify their identity verification (authentication) for this challenge, in [RFC
            3339](https://tools.ietf.org/html/rfc3339) UTC date-time format (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
        expiresAt:
          description: >-
            The time stamp when the this challenge expires, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format
            (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
        redemptionHistory:
          description: >-
            The time stamps when a service or operation redeemed this challenge, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time
            format (`YYYY-MM-DDThh:mm:ss.sssZ`). Item 0 is the time stamp the challenge was first redeemed, item 1 is the time stamp of the next
            redemption, and so on.
          readOnly: true
          type: array
          items:
            type: string
            format: date-time
            readOnly: true
        code:
          description: >-
            An optional authentication code which is only returned in the challenge resource if both a) the platform assigned the `code` when
            [constructing the challenge](#op-createChallenge)), _and_ b) the user has successfully verified the challenge. The client must [re-fetch
            the verified challenge](#op-getChallenge) in order to access this property.
          type: string
          minLength: 16
          maxLength: 128
          readOnly: true
      type: object
      x-apiture-flattened: true
    attributeValue:
      x-apiture-version: 2.0.0
      title: Attribute Value (v2.0.0)
      description: |-
        The data associated with this attribute.

        This schema was resolved from [`common/attributeValue`](https://production.api.apiture.com/schemas/common/attributeValue/v2.0.0/model.json).
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/attributeValue/v2.0.0/model.json'
      x-apiture-namespace: common
      type: object
      properties: {}
      x-apiture-flattened: true
    simpleLabel:
      title: Simple Label (v1.0.0)
      description: |-
        A text label and optional description.

        This schema was resolved from [`common/simpleLabel`](https://production.api.apiture.com/schemas/common/simpleLabel/v1.0.0/model.json).
      x-apiture-version: 1.0.0
      type: object
      required:
        - label
      properties:
        label:
          type: string
          description: A label or title which may be used as labels or other UI controls which present a value.
          example: Board of Directors
        description:
          type: string
          description: A more detailed localized description of a localizable label.
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/simpleLabel/v1.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-flattened: true
    summaryChallenge:
      title: Summary Challenge (v1.0.0)
      description: |-
        Summary representation of a challenge, used in the challenge collection.

        This schema was resolved from [`auth/summaryChallenge`](https://production.api.apiture.com/schemas/auth/summaryChallenge/v1.0.0/model.json).
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/summaryChallenge/v1.0.0/model.json'
      x-apiture-namespace: auth
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/challengeFields'
        - properties:
            - _id
            - redemptionCount
            - state
            - createdAt
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        reason:
          description: >-
            The reason the application or service has issued a challenge requesting the user verify their identity. This is for labeling or
            informational purposes.
          type: string
          x-apiture-todo:
            - Should this be a reasonCode (non-localizable identifier and reason label?
        contextUri:
          description: >-
            The URI of a resource that establishes the context in which the user is asked to authenticate their identity. For example, for this may be
            for a pending transfer, a user's mailing address, or an account if adding a joint owner.
          type: string
          format: uri
          maxLength: 2048
        userId:
          description: >-
            The user ID of the user who is requested to verify their identity. The default is the userID of the authenticated person creating the
            challenge.
          type: string
        minimumAuthenticatorCount:
          description: The minimum number of different authenticators the user must verify in order to satisfy the identity challenge. The default is 1.
          type: integer
          minimum: 0
          maximum: 4
        maximumRedemptionCount:
          description: The maximum number of times the challenge may be used or redeemed. The default is 1.
          type: integer
          minimum: 1
        _id:
          description: The unique identifier for this challenge resource. This is an immutable opaque string assigned upon creation.
          readOnly: true
          type: string
        redemptionCount:
          description: How many times the challenge has been redeemed.
          type: integer
          readOnly: true
        state:
          description: The state of this authenticator.
          allOf:
            - $ref: '#/components/schemas/challengeState'
          readOnly: true
        createdAt:
          description: >-
            The time stamp when challenge was created, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format
            (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
      type: object
      x-apiture-flattened: true
    authenticator:
      title: Authenticator (v1.0.1)
      x-apiture-version: 1.0.1
      description: >-
        Representation of authenticators which verify a user's identity.



        <h3 class='schema-links' id="authenticator-links" >Links</h3>


        Response and request bodies using this <strong><code>authenticator</code></strong> schema may contain

        the following <a href='https://developer.apiture.com/docs/concepts/links'>links</a>:


        <table>

        <tr>
          <th>Rel</th><th>Summary</th><th>Method</th>
        </tr>


        <tr>

        <td><a href='#op-retryAuthenticator'><strong><code>apiture:retry</code></strong></a></td><td>Retry an
        authenticator</td><td><code>POST</code></td>

        </tr>


        <tr>

        <td><a href='#op-startAuthenticator'><strong><code>apiture:start</code></strong></a></td><td>Start an
        authenticator</td><td><code>POST</code></td>

        </tr>


        <tr>

        <td><a href='#op-verifyAuthenticator'><strong><code>apiture:verify</code></strong></a></td><td>Verify a user's
        identity</td><td><code>POST</code></td>

        </tr>


        <tr>

        <td><a href='#op-getChallenge'><strong><code>apiture:challenge</code></strong></a></td><td>Fetch a representation of this
        challenge</td><td><code>GET</code></td>

        </tr>

        </table>



        This schema was resolved from [`auth/authenticator`](https://production.api.apiture.com/schemas/auth/authenticator/v1.0.1/model.json).
      example:
        _id: 7fadd35b-6f6b-4901-b1ba-d3b91c9dcee3
        _profile: 'https://api.apiture.com/schemas/auth/authenticator/v1.0.1/profile.json'
        userId: b2720469-3497-4b82-8b85-30f2155aa66d
        state: started
        type:
          name: sms
          label: SMS Code
          description: Enter a code sent via SMS to the user's preferred mobile device.
          category: device
          schema:
            title: SMS attributes
            description: Schema for an authenticator's `attributes` when the authenticator type is `sms`.
            type: object
            required:
              - code
              - length
            properties:
              code:
                type: string
                description: >-
                  A code that was sent to the user's mobile device via SMS. The user should enter the code in the app, then set `attributes.code` to
                  that. The length of the code (the number of characters or digits) must equal the `length'.
                minLength: 3
                maxLength: 10
              length:
                description: The number of digits/characters that are sent to the user via SMS.
                type: integer
                minimum: 3
                maximum: 10
                example: 6
        maximumRetries: 3
        retryCount: 1
        createdAt: '2019-08-23T12:42:50.375Z'
        expiresAt: '2019-08-23T13:12:50.375Z'
        _links:
          self:
            href: /auth/challenges/2e61e506-1568-4f1a-a93e-4d0a48a06d0e/authenticators/7fadd35b-6f6b-4901-b1ba-d3b91c9dcee3
          'apiture:challenge':
            href: /auth/challenges/challenges/b59438cd-5efb-4915-916b-0600bb2a4e1e
          'apiture:retry':
            href: /auth/challenges/retriedAuthenticators?authenticator=7fadd35b-6f6b-4901-b1ba-d3b91c9dcee3
          'apiture:verify':
            href: /auth/challenges/verifiedAuthenticators
      x-apiture-links:
        - rel: 'apiture:retry'
          operationId: retryAuthenticator
        - rel: 'apiture:start'
          operationId: startAuthenticator
        - rel: 'apiture:verify'
          operationId: verifyAuthenticator
        - rel: 'apiture:challenge'
          operationId: getChallenge
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/authenticator/v1.0.1/model.json'
      x-apiture-namespace: auth
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/authenticatorFields'
        - properties:
            - _id
            - userId
            - state
            - retryCount
            - attributes
            - createdAt
            - verifiedAt
            - failedAt
            - expiresAt
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        type:
          description: The type of this authenticator. This must be one of the items in the `/authenticatorTypes` resource.
          allOf:
            - $ref: '#/components/schemas/authenticatorType'
        maximumRetries:
          description: >-
            The maximum number of times the user may retry this authenticator. If `0`, the user must authenticate correctly on the first try. When an
            authenticator is retried, the client should `POST` to the `apiture:retry` link on the authenticators; absence of the link means the user
            cannot retry the authenticator. The default is `3`.
          type: integer
          minimum: 0
          maximum: 10
        _id:
          description: The unique identifier for this authenticator resource. This is an immutable opaque string assigned upon creation.
          readOnly: true
          type: string
        userId:
          description: The user ID of the user who is requested to verify their identity.
          type: string
        state:
          description: The state of this authenticator. This is derived and read-only.
          allOf:
            - $ref: '#/components/schemas/authenticatorState'
          readOnly: true
        retryCount:
          description: The actual number of times a user has retried this authenticator.
          type: integer
          minimum: 0
          maximum: 10
          readOnly: true
        attributes:
          description: >-
            Data collected from the user that is used to verify this authenticator. This data conforms to the schema defined in the `type`. For
            example, for `sms`, the `attributes` must contains a `code`.
          type: object
        createdAt:
          description: >-
            The time stamp when authenticator was created, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format
            (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
        verifiedAt:
          description: >-
            The time stamp when authenticator was verified in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format
            (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
        failedAt:
          description: >-
            The time stamp when the user failed to verify their identity verification (authentication) for this challenge, in [RFC
            3339](https://tools.ietf.org/html/rfc3339) UTC date-time format (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
        expiresAt:
          description: >-
            The time stamp when the this challenge expires, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format
            (`YYYY-MM-DDThh:mm:ss.sssZ`).
          type: string
          format: date-time
          readOnly: true
      type: object
      x-apiture-flattened: true
    authenticatorFields:
      title: Authenticator Fields (v1.0.0)
      description: >-
        Common fields of an authenticator.


        This schema was resolved from
        [`auth/authenticatorFields`](https://production.api.apiture.com/schemas/auth/authenticatorFields/v1.0.0/model.json).
      x-apiture-fragment: true
      properties:
        type:
          description: The type of this authenticator. This must be one of the items in the `/authenticatorTypes` resource.
          allOf:
            - $ref: '#/components/schemas/authenticatorType'
        maximumRetries:
          description: >-
            The maximum number of times the user may retry this authenticator. If `0`, the user must authenticate correctly on the first try. When an
            authenticator is retried, the client should `POST` to the `apiture:retry` link on the authenticators; absence of the link means the user
            cannot retry the authenticator. The default is `3`.
          type: integer
          minimum: 0
          maximum: 10
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/authenticatorFields/v1.0.0/model.json'
      x-apiture-namespace: auth
      type: object
      x-apiture-flattened: true
    authenticatorState:
      title: Authenticator State (v1.0.0)
      description: >-
        The state of a challenge authenticator resource.

          * The `startAuthenticator` operation (link `apiture:start`) changes the state
            from `pending` to `started`.
          * The `retryAuthenticator` operation (link `apiture:retry`) changes the state
            to `started` and is only allowed if the authenticator has more retries available.
          * The `verifyAuthenticator` operation (link `apiture:verify`) validates
            the `attributes` and changes the state
            to `verified` if valid or
            to `failed` if invalid.

        <strong><code>authenticatorState</code></strong> strings may have one of the following

        [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):


        <table>

        <tr>
          <th>Value</th><th>Description</th>
        </tr>


        <tr>
            <td><strong><code>pending</code></strong></td><td>Pending: The authenticator is created but not yet started.</td>
            </tr>
        <tr>
            <td><strong><code>started</code></strong></td><td>Started: The user has started the authenticator.</td>
            </tr>
        <tr>
            <td><strong><code>verified</code></strong></td><td>Verified: The user corresponding verified the authenticator.</td>
            </tr>
        <tr>
            <td><strong><code>failed</code></strong></td><td>Failed: The user failed the authenticators criteria.</td>
            </tr>
        <tr>
            <td><strong><code>expired</code></strong></td><td>Expired: The authenticator expired before the user completed the criteria.</td>
            </tr>
        </table>



        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)

        named `authenticatorState` in the response from the [`getLabels`](#op-getLabels) operation.


        This schema was resolved from
        [`auth/authenticatorState`](https://production.api.apiture.com/schemas/auth/authenticatorState/v1.0.0/model.json).
      x-apiture-enum: authenticatorState
      type: string
      enum:
        - pending
        - started
        - verified
        - failed
        - expired
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/authenticatorState/v1.0.0/model.json'
      x-apiture-namespace: auth
      x-apiture-flattened: true
    challengeFields:
      title: Challenge Fields (v1.0.0)
      description: |-
        Properties of challenge objects.

        This schema was resolved from [`auth/challengeFields`](https://production.api.apiture.com/schemas/auth/challengeFields/v1.0.0/model.json).
      x-apiture-fragment: true
      properties:
        reason:
          description: >-
            The reason the application or service has issued a challenge requesting the user verify their identity. This is for labeling or
            informational purposes.
          type: string
          x-apiture-todo:
            - Should this be a reasonCode (non-localizable identifier and reason label?
        contextUri:
          description: >-
            The URI of a resource that establishes the context in which the user is asked to authenticate their identity. For example, for this may be
            for a pending transfer, a user's mailing address, or an account if adding a joint owner.
          type: string
          format: uri
          maxLength: 2048
        userId:
          description: >-
            The user ID of the user who is requested to verify their identity. The default is the userID of the authenticated person creating the
            challenge.
          type: string
        minimumAuthenticatorCount:
          description: The minimum number of different authenticators the user must verify in order to satisfy the identity challenge. The default is 1.
          type: integer
          minimum: 0
          maximum: 4
        maximumRedemptionCount:
          description: The maximum number of times the challenge may be used or redeemed. The default is 1.
          type: integer
          minimum: 1
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/challengeFields/v1.0.0/model.json'
      x-apiture-namespace: auth
      type: object
      x-apiture-flattened: true
    challengeState:
      title: Challenge States (v1.0.0)
      description: |-
        The state of an identity challenge resource. This is derived based on the state of the challenge's authenticators.

        <strong><code>challengeState</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>pending</code></strong></td><td>Pending: The challenge is created but not yet started.</td>
            </tr>
        <tr>
            <td><strong><code>started</code></strong></td><td>Started: The user has started the challenge and associated authenticator(s).</td>
            </tr>
        <tr>
            <td><strong><code>verified</code></strong></td><td>Verified: The user correctly verified the corresponding authenticator(s), marking the challenge as verified.</td>
            </tr>
        <tr>
            <td><strong><code>failed</code></strong></td><td>Failed: The challenge has failed, often because the user failed one or more of the authenticators.</td>
            </tr>
        <tr>
            <td><strong><code>redeemed</code></strong></td><td>Redeemed: The user has redeemed (used) the challenge.</td>
            </tr>
        <tr>
            <td><strong><code>expired</code></strong></td><td>Expired: The challenge has expired without being verified.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `challengeState` in the response from the [`getLabels`](#op-getLabels) operation.

        This schema was resolved from [`auth/challengeState`](https://production.api.apiture.com/schemas/auth/challengeState/v1.0.0/model.json).
      x-apiture-enum: challengeState
      type: string
      enum:
        - pending
        - started
        - verified
        - failed
        - redeemed
        - expired
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/challengeState/v1.0.0/model.json'
      x-apiture-namespace: auth
      x-apiture-flattened: true
    authenticatorType:
      title: Authenticator Type (v1.0.0)
      description: |-
        An authenticator type description.

        This schema was resolved from [`auth/authenticatorType`](https://production.api.apiture.com/schemas/auth/authenticatorType/v1.0.0/model.json).
      properties:
        name:
          type: string
          description: The name of this authenticator; also the key in the `authenticatorTypes` object.
          example: sms
        label:
          type: string
          description: A localized label or title which may be used labels or other UI controls which present a value.
          example: SMS code
        description:
          type: string
          description: A more detailed localized description of an authenticator type.
        language:
          type: string
          description: >-
            The actual natural language tag to which this authentication type description is associated, as per [RFC
            7231](https://tools.ietf.org/html/rfc7231#section-3.1.3.1). If omitted, this serves as the _default_.
          example: en-us
        category:
          type: string
          description: The authentication category.
          allOf:
            - $ref: '#/components/schemas/authenticatorCategory'
        schema:
          type: object
          description: >-
            The JSON schema which describe the `attributes` object for all authenticators of this type. For example, for `sms`, the schema defines a
            required `code` string.
      example:
        name: sms
        label: SMS code
        description: Enter a code sent via SMS to the user's preferred mobile device.
        category: device
        schema:
          title: SMS attributes
          description: Schema for an authenticator's `attributes` when the authenticator type is `sms`.
          type: object
          required:
            - code
            - length
          properties:
            code:
              type: string
              description: >-
                A code that was sent to the user's mobile device via SMS. The user should enter the code in the app, then set `attributes.code` to
                that. The length of the code (the number of characters or digits) must equal the `length'.
              minLength: 3
              maxLength: 10
            length:
              description: The number of digits/characters that are sent to the user via SMS.
              type: integer
              minimum: 3
              maximum: 10
              example: 6
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/authenticatorType/v1.0.0/model.json'
      x-apiture-namespace: auth
      type: object
      x-apiture-flattened: true
    authenticatorCategory:
      title: authenticatorCategory (v1.0.0)
      description: >-
        Categories which help classify and organize different authenticator types:
          * `knowledge` - Something you know, such as a password or
          answers to personal questions.
          * `biometric` - Something you are, such as
          facial recognition or fingerprints.
          * `device` - Something you have, such as a mobile phone
          (for confirmation via a code sent via text message) or an electronic key.

        <strong><code>authenticatorCategory</code></strong> strings may have one of the following

        [enumerated values](https://developer.apiture.com/concepts/label-groups#enumerations):


        <table>

        <tr>
          <th>Value</th><th>Description</th>
        </tr>


        <tr>
            <td><strong><code>knowledge</code></strong></td><td>Knowledge: Authenticate with information the user knows, such as a password or answers to personal questions.</td>
            </tr>
        <tr>
            <td><strong><code>biometric</code></strong></td><td>Biometric: Authenticate with physical characteristics of the user, such as fingerprints, voiceprint, or faceprint.</td>
            </tr>
        <tr>
            <td><strong><code>device</code></strong></td><td>Device: Authenticate with a device that the user has, such as a mobile phone or an electronic key.</td>
            </tr>
        </table>



        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)

        named `authenticatorCategory` in the response from the [`getLabels`](#op-getLabels) operation.


        This schema was resolved from
        [`auth/authenticatorCategory`](https://production.api.apiture.com/schemas/auth/authenticatorCategory/v1.0.0/model.json).
      x-apiture-enum: authenticatorCategory
      type: string
      enum:
        - knowledge
        - biometric
        - device
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/auth/authenticatorCategory/v1.0.0/model.json'
      x-apiture-namespace: auth
      x-apiture-flattened: true
x-apiture-errors:
  challengeRefNotFound:
    description: There is no challence resource corresponding to the referenced challenge
    remediation: Pass a reference to a valid challence resource
  missingApitureChallengeHeader:
    description: The Apiture-Challenge request header is missing
    remediation: Pass a reference to a valid challence resource in the Apiture-Challenge header
  challengedAlreadyRedeemed:
    description: The challenge resource has already been redeemed
    remediation: Use the most recently issued challenge
  challengedExpired:
    description: The challenge resource has expired
    remediation: Use the most recently issued challenge and complete the authenticators before the challenge expires
  invalidAccount:
    description: 'The `apiture:account` link was missing, was not a valid URL, or refers to an account that is not eligible for debiting for payments.'
    remediation: Pass the URL of an account that is suitable for payments.
  noSuchPayee:
    description: The payment instruction included a payee `_id` but no such payee exists.
    remediation: Update a payment instruction using an existing payee or a payee without `_id` to create a new payee.
  paymentMethodMismatch:
    description: The payment instruction does not include the corresponding payment details for the `paymentMethod.type`
    remediation: >-
      Set the correct details in the request. For example if the `paymentMethod.type` is `wireTransfer`, the body must contain the
      `paymentMethod.wireTransfer` object.
  paymentMethodDisallowsUpdates:
    description: Updates to payment instructions are not allowed for requests using this payment method
    remediation: Contact the financial institution to cancel the payment and submit a new payment instruction
  cannotUpdateCompletedPaymentInstructions:
    description: Completed payment instructions are immutable
    remediation: Only update pending requests or submitted requests that allow updates as per the payment method definition
  cannotChangePaymentMethodType:
    description: 'Once a payment instruction has been submitted, the payment method type is not mutable'
    remediation: Contact the financial institution to cancel the payment and submit a new payment instruction
  invalidAttachment:
    description: >-
      A file attachment URL is invalid, no such resource exists, the attachment content does not match the document type, or the attachment content is
      not an allowed.
    remediation: Pass a valid attachment document URL
  payeeMismatch:
    description: >-
      A payee with `type` of `person` must contain the `person` object and its required properties, and a payee with `type` of `organization` must
      contain the `organization` object and its required properties. Only one of the `person` and `organization` objects is allowed.
    remediation: Pass the required object corresponding to the payee's `type`.
x-apiture-traits:
  - api:
      title: Payments and Payees
      basePath: payments
      applied: true
  - resource:
      name: payment
      readOnly: true
      collection: history
      simpleModelSchema: true
      applied: true
  - resource:
      name: payment instruction
      simpleModelSchema: true
      applied: true
  - resource:
      name: payee
      simpleModelSchema: true
      applied: true
  - resource:
      name: payment method
      resource: paymentMethodDefinition
      readOnly: true
      simpleModelSchema: true
      sortable: false
      filterable: false
      paginated: false
      searchable: false
      applied: true
  - state:
      name: payment instruction
      state: submitted
      verb: submit
      applied: true
  - state:
      name: payment instruction
      state: processing
      verb: process
      applied: true
  - state:
      name: payment instruction
      state: completed
      verb: complete
      applied: true
  - state:
      name: payment instruction
      state: rejected
      verb: reject
      applied: true
  - labels:
      applied: false
  - security:
      baseScope: banking
      applied: false
x-apiture-annotated-at: '2020-10-23T14:26:18.662Z'
