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

# Add Bank Account

> - Create a new bank account for a specified user.
- Link the bank account to the user for future transactions.
- Use this endpoint to add account details.



## OpenAPI

````yaml POST /api/platform/accounts/add-account
openapi: 3.1.0
info:
  title: paywint
  version: 0.1.0
servers:
  - url: http://localhost:8001
  - url: https://api.pw.wintpay.com
  - url: https://test.pw.wintpay.com
  - url: https://api.sandbox.paywint.com
security: []
paths:
  /api/platform/accounts/add-account:
    post:
      tags:
        - Platform Accounts
      summary: Create Bank
      description: |-
        - Create a new bank account for a specified user.
        - Link the bank account to the user for future transactions.
        - Use this endpoint to add account details.
      operationId: add_account_api_platform_accounts_add_account_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
        - name: X-Platform-ID
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              Unique platform identifier (UUID). You receive this during
              onboarding. Must be sent with every API request.
            title: X-Platform-Id
          description: >-
            Unique platform identifier (UUID). You receive this during
            onboarding. Must be sent with every API request.
        - name: X-Signature
          in: header
          required: true
          schema:
            type: string
            description: >-
              HMAC-SHA256 request signature for authentication. Use your
              platform secret key to compute it as: `METHOD + PATH + QUERY +
              BODY_HASH`.
            title: X-Signature
          description: >-
            HMAC-SHA256 request signature for authentication. Use your platform
            secret key to compute it as: `METHOD + PATH + QUERY + BODY_HASH`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformBankAccountCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse_PlatformBankAccountRead_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PlatformBankAccountCreate:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
          description: UUID of the user to whom this bank account belongs
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        account_holder_name:
          type: string
          maxLength: 100
          title: Account Holder Name
          description: >-
            Name of the account holder (optional, will use user name if not
            provided)
          example: John D. Doe
        account_holder_address:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Account Holder Address
          description: Street address of the account holder
          example: 123 Main Street
        account_holder_city:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Account Holder City
          description: City of the account holder
          example: New York
        account_holder_state:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Account Holder State
          description: State of the account holder
          example: NY
        account_holder_zip:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Account Holder Zip
          description: Postal code of the account holder
          example: '10001'
        account_holder_country:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Account Holder Country
          description: Country of the account holder
          example: US
        bank_name:
          type: string
          maxLength: 100
          title: Bank Name
          description: Full name of the bank
          example: Bank of America
        nick_name:
          type: string
          maxLength: 100
          title: Nick Name
          description: >-
            Optional nickname to identify the account (e.g., 'Personal
            Checking')
          example: Business Wallet Account
        account_number:
          type: string
          maxLength: 20
          title: Account Number
          description: Bank account number
          example: '1234567890'
        routing_number:
          type: string
          maxLength: 9
          title: Routing Number
          description: Bank routing number for ACH transactions
          example: '021000021'
        bank_address:
          type: string
          maxLength: 300
          title: Bank Address
          description: Street address of the bank
          example: 123 Bank Street
        city:
          type: string
          maxLength: 50
          title: City
          description: City of the bank
          example: New York
        state:
          type: string
          maxLength: 50
          title: State
          description: State of the bank
          example: NY
        zip:
          type: string
          maxLength: 10
          title: Zip
          description: Postal code of the bank
          example: '10001'
        country:
          type: string
          maxLength: 50
          title: Country
          description: Country of the bank
          example: US
        account_type:
          $ref: '#/components/schemas/PlatformAccountType'
          description: Type of the bank account (e.g., CHECKING, SAVINGS, BUSINESS)
          example: CHECKING
        is_default:
          type: boolean
          title: Is Default
          description: Set this account as user's default
          default: true
          example: true
      type: object
      required:
        - user_id
        - account_holder_name
        - bank_name
        - nick_name
        - account_number
        - routing_number
        - bank_address
        - city
        - state
        - zip
        - country
        - account_type
      title: PlatformBankAccountCreate
    CommonResponse_PlatformBankAccountRead_:
      properties:
        success:
          type: boolean
          title: Success
          description: Indicates whether the request was processed successfully.
          default: true
          example: true
        message:
          type: string
          title: Message
          description: >-
            A short, human-readable message describing the result of the
            request.
          default: Success
          example: Operation completed.
        data:
          anyOf:
            - $ref: '#/components/schemas/PlatformBankAccountRead'
            - type: 'null'
          description: The main response payload, if applicable
        queryGeneratedTime:
          anyOf:
            - type: number
            - type: 'null'
          title: Querygeneratedtime
          description: >-
            The Unix timestamp (in seconds) indicating when the response was
            generated.
          default: 1782303609.673092
          example: 1718006400
      type: object
      title: CommonResponse[PlatformBankAccountRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PlatformAccountType:
      type: string
      enum:
        - PERSONAL_SAVINGS
        - BUSINESS_SAVINGS
        - BUSINESS_CHECKING
        - PERSONAL_CHECKING
        - PAYWINT_SAVINGS
        - PAYWINT_BUSINESS
      title: PlatformAccountType
    PlatformBankAccountRead:
      properties:
        account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Account Id
          description: Unique identifier of the bank account record
          example: 5bf6f0d6-0677-4607-9541-68ef7faecbdb
        bank_nick_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Bank Nick Name
          description: User-defined nickname to easily identify the bank account
          example: Personal Checking
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
          description: Last four digit of bank account number
          example: '6789'
        account_balance:
          anyOf:
            - type: number
            - type: 'null'
          title: Account Balance
          description: Current balance of the bank account
          example: 1000
        routing_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Routing Number
          description: Bank routing number used for ACH transactions
          example: '011000015'
        account_type:
          anyOf:
            - $ref: '#/components/schemas/PlatformAccountType'
            - type: 'null'
          description: Type of the bank account such as CHECKING or SAVINGS
          example: CHECKING
        bank_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Bank Name
          description: Official name of the bank where the account is held
          example: First National Bank
        account_holder_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Holder Name
          description: Full name of the person or entity that owns the bank account
          example: John Doe
        verification_status:
          anyOf:
            - $ref: '#/components/schemas/BankVerificationStatus'
            - type: 'null'
          description: Current verification status of the bank account
          example: not_applied
        verification_type:
          anyOf:
            - $ref: '#/components/schemas/VerificationType'
            - type: 'null'
          description: Verification method used (e.g., PLAID or MD)
          example: MD
        is_verified:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Verified
          description: Indicates whether the bank account has been successfully verified
          example: false
        is_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Default
          description: Marks this account as the user's default funding source
          example: true
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Timestamp when the bank account was added to the system
          example: '2025-06-16T12:03:48.726826Z'
      type: object
      title: PlatformBankAccountRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    BankVerificationStatus:
      type: string
      enum:
        - not_applied
        - applied
        - verified
        - rejected
      title: BankVerificationStatus
    VerificationType:
      type: string
      enum:
        - PLAID
        - MD
        - PW
      title: VerificationType

````