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

# Create deposit expectation

> Register an expected incoming bank transfer for a user bank account.

Use this endpoint to register a deposit expectation when the user sends a bank transfer. When
the transfer arrives, Wealthyhood matches it against pending expectations by reference and amount,
then automatically reconciles it as a completed deposit.


## OpenAPI

````yaml POST /deposits/expectations
openapi: 3.0.3
info:
  title: Wealthyhood Deposits API
  version: 1.0.0
  description: |
    Endpoints to retrieve user deposit activity.

    All requests require a bearer token and the `x-user-id` header.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host name.
security:
  - bearerAuth: []
tags:
  - name: Deposits
    description: Retrieve deposit history for user payments.
paths:
  /deposits/expectations:
    post:
      tags:
        - Deposits
      summary: Create deposit expectation
      description: >
        Register an expected incoming bank transfer for a bank account that
        belongs to the authenticated user.


        When the matching bank transfer arrives Wealthyhood reconciles it
        automatically.
      parameters:
        - $ref: '#/components/parameters/ExternalUserId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDepositRequest'
      responses:
        '201':
          description: Deposit expectation created successfully
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          description: Bank account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Bank account not found
                code: NOT_FOUND
        '409':
          $ref: '#/components/responses/ConflictError'
components:
  parameters:
    ExternalUserId:
      name: x-user-id
      in: header
      description: The external user identifier of the acting customer.
      required: true
      schema:
        type: string
        example: bank-user-12345
  schemas:
    CreateDepositRequest:
      type: object
      required:
        - bankAccountId
        - reference
        - consideration
      properties:
        bankAccountId:
          type: string
          description: MongoDB ObjectId of the bank account to credit
          pattern: ^[a-f0-9]{24}$
          example: 64f0c51e7fb3fc001234abcd
        reference:
          type: string
          description: >
            Payment reference the user will include in their bank transfer.
            Leading and trailing

            whitespace are trimmed; the value is stored and matched in lowercase
            (ASCII) so it aligns

            with the bank statement reference field.
          minLength: 1
          example: wallet-topup-5f91ce
        consideration:
          type: object
          required:
            - amount
          properties:
            amount:
              type: number
              description: >-
                Expected deposit amount in major currency units (e.g. 10.50 for
                €10.50)
              minimum: 0.01
              example: 250
    Error:
      type: object
      required:
        - message
        - code
      properties:
        message:
          type: string
          example: Invalid amount
        code:
          type: string
          example: INVALID_AMOUNT
  responses:
    BadRequestError:
      description: Bad request – invalid parameters or malformed request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Invalid amount
            code: INVALID_AMOUNT
    UnauthorizedError:
      description: Unauthorized – missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Authentication required
            code: UNAUTHORIZED
    ForbiddenError:
      description: Forbidden – valid credentials but insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Access denied
            code: FORBIDDEN
    ConflictError:
      description: Conflict – a deposit expectation with this reference already exists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: >-
              A pending deposit expectation with this reference and amount
              already exists
            code: CONFLICT
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````