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

# Simulate Incoming Wire V2

> Simulates an incoming wire against a creditor account in sandbox. Automatically advances to posted on creation; no call to advance required.



## OpenAPI

````yaml POST /v2/simulate/wires/incoming
openapi: 3.0.1
info:
  title: Lead Bank
  description: Lead Bank's APIs
  version: v1.0
servers:
  - url: https://api.sandbox.lead.bank
  - url: https://api.lead.bank
security:
  - bearerAuth: []
tags:
  - name: ACH
  - name: Account Number
  - name: OAuth
  - name: Events
  - name: Instant Payments
  - name: Lending
  - name: Simulation
  - name: Internal Transfer
  - name: Disbursement
  - name: Entity
  - name: Wire
  - name: Originator
  - name: Funding
  - name: Balances
  - name: Compliance
  - name: UserAccount
  - name: Blockchain Payment
paths:
  /v2/simulate/wires/incoming:
    post:
      tags:
        - Simulation
      summary: Simulate Incoming Wire V2
      description: >-
        Simulates an incoming wire against a creditor account in sandbox.
        Automatically advances to posted on creation; no call to advance
        required.
      operationId: simulate-incoming-wire-v2
      parameters:
        - name: Idempotency-Key
          in: header
          description: Idempotency key
          required: true
          schema:
            type: string
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateIncomingWireRequestV2'
      responses:
        '200':
          description: Incoming wire object created. The response body is empty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateResponse'
        '422':
          description: >-
            Your request parameters did not validate. Field-level detail is
            returned, including CPMI

            character set violations, a US BIC on
            `debtor_agent.business_identifier_code`, neither

            routing field present on `debtor_agent`, or an invalid nine-digit
            ABA on

            `debtor_agent.local_routing_identifier.value` or
            `instructing_agent.local_routing_identifier.value`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    SimulateIncomingWireRequestV2:
      type: object
      description: >-
        Request body to simulate an incoming wire in sandbox. The corridor is
        inferred from the

        shape of `debtor_agent` rather than an explicit field, matching how Lead
        derives the

        corridor from the ISO 20022 payload on real incoming wires: a
        `business_identifier_code`

        with a non-US country code produces an international wire, while
        providing only

        `local_routing_identifier` produces a domestic wire.
      required:
        - amount
        - creditor_account_number_id
        - debtor
        - debtor_agent
      properties:
        amount:
          $ref: '#/components/schemas/WireAmount'
          description: Wire amount in USD cents.
        creditor_account_number_id:
          $ref: '#/components/schemas/AccountNumberID'
          description: The ID of the account number that will receive the simulated wire.
        debtor:
          $ref: '#/components/schemas/SimulateWireDebtorRequestV2'
          description: The party sending the wire.
        debtor_agent:
          $ref: '#/components/schemas/SimulateWireDebtorAgentRequest'
          description: The debtor's financial institution.
        instructing_agent:
          $ref: '#/components/schemas/SimulateWireInstructingAgentRequest'
          description: The financial institution that transmitted the payment to Lead.
        remittance_details:
          $ref: '#/components/schemas/WireRemittanceDetails'
          description: Details of the remittance information for the wire.
        payment_identifiers:
          $ref: '#/components/schemas/WirePaymentIdentifiers'
          description: Payment identifiers for the wire.
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: Additional metadata to associate with the wire.
    SimulateResponse:
      type: object
    APIError:
      type: object
      properties:
        code:
          type: string
          description: The error code.
        title:
          type: string
          description: The error title.
        detail:
          type: string
          description: A detailed error description.
        status:
          type: string
          description: The HTTP status code.
        invalid_parameters:
          type: array
          description: Invalid request parameters with reasons, if applicable.
          items:
            $ref: '#/components/schemas/InvalidParameterDetail'
        instance:
          type: string
          description: >-
            The object causing this specific occurrence of the error, if
            applicable.
    WireAmount:
      description: The amount of the wire transaction in cents.
      type: integer
      format: int64
      example: 5000
      minimum: 1
      maximum: 990000000000
    AccountNumberID:
      type: string
      description: The ID of the Lead Bank Account Number object.
      example: account_number_xyz123
      pattern: ^account_number_\w+$
    SimulateWireDebtorRequestV2:
      type: object
      description: The party sending the wire.
      required:
        - name
        - account_identifier
        - address
      properties:
        name:
          type: string
          description: Name of the sending party.
          minLength: 1
          maxLength: 140
          pattern: >-
            ^[
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*[\w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]][
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*$
          example: Alex Smith
        account_identifier:
          type: object
          description: Account identifier of the sending party.
          required:
            - type
            - value
          properties:
            type:
              type: string
              description: Type of account identifier.
              enum:
                - account_number
                - iban
              example: account_number
            value:
              type: string
              description: Account identifier value of the sending party.
              minLength: 1
              maxLength: 34
              pattern: ^[a-zA-Z0-9 ]*[a-zA-Z0-9]+$
              example: '1032345678'
        address:
          $ref: '#/components/schemas/WirePostalAddressRequestV2'
          description: Postal address of the sending party.
    SimulateWireDebtorAgentRequest:
      type: object
      description: The debtor's financial institution.
      properties:
        local_routing_identifier:
          $ref: '#/components/schemas/LocalRoutingIdentifierRequest'
          description: >-
            Routing or transit code used by the financial institution's local
            clearing system. For

            domestic wires, this is always a US ABA routing number. For
            international wires, this may be

            another local clearing code.
        business_identifier_code:
          type: string
          description: >-
            Business Identifier Code (BIC) of the financial institution. A
            foreign financial

            institution's BIC is required to simulate an international wire.
          minLength: 8
          maxLength: 11
          pattern: ^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$
          example: DEUTDEDB
    SimulateWireInstructingAgentRequest:
      type: object
      description: The financial institution that transmitted the payment to Lead.
      properties:
        local_routing_identifier:
          $ref: '#/components/schemas/LocalRoutingIdentifierRequest'
          description: >-
            Routing or transit code used to identify the instructing agent
            within a local clearing system.
    WireRemittanceDetails:
      type: object
      description: Wire remittance details.
      properties:
        payment_notification:
          type: string
          readOnly: true
          description: Information about the payment notification.
          example: ba77ae30-efb8-4139-8e51-37e3fd905b2b
        message_to_creditor:
          type: string
          description: Information intended specifically for the creditor.
          example: Payment for invoice 12345
          maxLength: 140
          pattern: ^[ \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]\n]*$
        message_to_receiving_fi:
          type: string
          readOnly: true
          description: >-
            Information intended specifically for the receiving financial
            institution.
          example: message for receiving financial institution
        fi_to_fi_message:
          type: string
          readOnly: true
          description: >-
            Financial institution to financial institution information, most
            often used by a financial institution to explain additional detail
            of a wire.
          example: message from financial institution to financial institution
        transfer_purpose:
          $ref: '#/components/schemas/WireTransferPurposeV1'
    WirePaymentIdentifiers:
      type: object
      description: Wire payment identifiers.
      properties:
        message_identification:
          type: string
          readOnly: true
          description: >-
            Point to point reference, as assigned by the instructing party, and
            sent to the next party in the chain to unambiguously identify the
            message..
          example: 20241215MMQFMP2L017736
        end_to_end_identification:
          type: string
          description: >-
            Unique identification that the initiating party in a wire message
            can use to unambiguously identify the transaction. This is passed
            through, unchanged, throughout the entire wire chain.
          maxLength: 35
          pattern: ^[ \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*$
          example: EndtoEnd12345
        uetr:
          type: string
          readOnly: true
          description: >-
            Universally unique identifier to provide an end-to-end reference of
            a payment transaction.
          format: uuid
          example: dae7d83c-1624-4a79-a8ef-3794de115c13
        instruction_identification:
          type: string
          readOnly: true
          description: >-
            Unique identification, as assigned by an instructing party for an
            instructed party, to unambiguously identify the instruction.
          example: Instruction12345
        return_identification:
          type: string
          readOnly: true
          description: >-
            Unique identification, as assigned by an instructing party for an
            instructed party, to unambiguously identify the returned
            transaction.
          example: ReturnInstruction12345
    Metadata:
      type: object
      additionalProperties:
        type: string
      description: >-
        A set of key-value pairs that can be used to store additional
        information related to this object.
    InvalidParameterDetail:
      type: object
      properties:
        parameter:
          type: string
          description: Which parameter is invalid.
          example: transaction_type
        reason:
          type: string
          description: Why the parameter is invalid.
    WirePostalAddressRequestV2:
      type: object
      description: >-
        Hybrid ISO 20022 postal address. `country` and `town_name` are required;
        up to two

        unstructured lines plus the structured fields are otherwise optional.
      required:
        - country
        - town_name
      properties:
        line_one:
          type: string
          description: Line one of the address in unstructured format.
          maxLength: 70
          pattern: >-
            ^[
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*[\w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]][
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*$
          example: 123 Main St
        line_two:
          type: string
          description: Line two of the address in unstructured format.
          maxLength: 70
          pattern: >-
            ^[
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*[\w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]][
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*$
          example: Suite 100
        town_name:
          type: string
          description: >-
            Name of a built-up area, with defined boundaries, and a local
            government.
          maxLength: 35
          pattern: >-
            ^[
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*[\w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]][
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*$
          example: Kansas City
        country_sub_division:
          type: string
          description: >-
            Identifies a subdivision of a country such as a state, region, or
            county.
          maxLength: 35
          pattern: >-
            ^[
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*[\w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]][
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*$
          example: MO
        post_code:
          type: string
          description: >-
            Identifier of letters and/or numbers added to a postal address to
            assist mail sorting.
          maxLength: 16
          pattern: >-
            ^[
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*[\w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]][
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*$
          example: '64105'
        country:
          type: string
          description: >-
            ISO 3166-1 alpha-2 code representing a nation with its own
            government.
          pattern: ^[A-Z]{2}$
          example: US
    LocalRoutingIdentifierRequest:
      type: object
      description: >-
        Routing or transit code used by the creditor agent's local clearing
        system for international wire transfers, such as a sort code, IFSC, or
        BSB. This field may be required for certain destinations.
      properties:
        value:
          type: string
          description: The value of the local routing identifier.
          minLength: 1
          maxLength: 35
          example: '123456'
    WireTransferPurposeV1:
      type: object
      description: The purpose or reason for which the wire is being sent.
      required:
        - type
      properties:
        type:
          description: Code representing the purpose of the transfer.
          type: string
          enum:
            - salary_payment
            - invoice_payment
            - gift
            - payment_for_goods
            - payment_for_services
            - insurance_premium_payment
            - interest_payment
            - loan
            - loan_repayment
            - account_management
            - cash_management_transfer
            - tax_payment
            - government_payment
            - benefits_payment
            - pension_payment
            - rent_payment
            - utilities_payment
            - education_payment
            - healthcare_payment
            - charitable_payment
            - refund
            - fee_payment
            - intercompany_transfer
            - investment_payment
            - fx_or_treasury
            - derivatives_payment
            - card_network_settlement
            - other
          example: invoice_payment
        other_details:
          type: string
          description: >-
            Free-formatted text for wire sender if `other` is selected for
            `type`.
          minLength: 3
          maxLength: 140
          pattern: >-
            ^[
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*[\w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]][
            \w/\-\?:\(\)\.,'\+!@#$%^&\*=`\{\|\}~";<>\[\\\]]*$
          example: Payment for consulting services
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````