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

# Create deposit

> Create a new deposit. This endpoint supports various payment methods, including generating bank account details (IBAN and BIC) for manual bank transfers, or initiating other provider-specific payin flows based on the provided currency and user details. For NGN currency, additional user details (firstName, lastName, email, phoneNumber) are required to generate dynamic virtual accounts.



## OpenAPI

````yaml /openapi.json post /v1/deposits
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Comprehensive payment platform API supporting fiat and crypto payments,
    currency conversion, and compliance management
  title: Zuba Payment Platform API
  version: '1.0'
servers: []
security: []
tags:
  - description: Manage M2M API keys and credentials
    name: API Keys
  - description: Internal ledger accounts and transactions
    name: Ledger
  - description: Handle incoming payments and deposits
    name: Pay-ins
  - description: Manage payouts, beneficiaries, and SEPA transfers
    name: Payouts
  - description: Manage outbound webhook endpoints and deliveries
    name: Webhooks
paths:
  /v1/deposits:
    post:
      tags:
        - Pay-ins
      summary: Create deposit
      description: >-
        Create a new deposit. This endpoint supports various payment methods,
        including generating bank account details (IBAN and BIC) for manual bank
        transfers, or initiating other provider-specific payin flows based on
        the provided currency and user details. For NGN currency, additional
        user details (firstName, lastName, email, phoneNumber) are required to
        generate dynamic virtual accounts.
      operationId: PayinController_createDeposit
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayinDto'
        required: true
      responses:
        '201':
          content:
            application/json:
              examples:
                eurPayin:
                  summary: EUR payin with bank transfer details
                  value:
                    amount: '100.50'
                    bic: DEUTDEFF
                    createdAt: '2024-01-15T10:30:00Z'
                    currency: EUR
                    description: Account top-up
                    iban: GB82WEST12345698765432
                    id: a47ac10b-58cc-4372-a567-0e02b2c3d470
                    method: manual_deposit
                    reference: PAYIN-2024-001
                    status: pending
                    updatedAt: '2024-01-15T10:30:00Z'
                ngnPayin:
                  summary: NGN payin with a dynamic virtual account
                  value:
                    amount: '10000.00'
                    bic: Wema Bank
                    createdAt: '2024-01-15T10:30:00Z'
                    currency: NGN
                    description: Account top-up
                    iban: '3234567890'
                    id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                    metadata:
                      accountName: John Doe
                      accountNumber: '3234567890'
                      bankName: Wema Bank
                      expiresAt: '2024-01-16T10:30:00Z'
                      providerReference: ONUS-REF-1706510200000
                    method: manual_deposit
                    reference: ONUS-REF-1706510200000
                    status: pending
                    updatedAt: '2024-01-15T10:30:00Z'
              schema:
                $ref: '#/components/schemas/PayinResponseDto'
          description: >-
            Deposit created successfully. Details for completing the transfer
            will be provided in the response.
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: Bad Request
                    type: string
                  message:
                    example: Validation failed
                    type: string
                  statusCode:
                    example: 400
                    type: number
          description: >-
            Bad request. Common message values: 'Validation failed' (generic),
            'Missing required fields for NGN currency: firstName, lastName,
            email, phoneNumber' (NGN payins), 'Duplicate request: clientRef
            <ref> already exists' (duplicate clientRef).
        '401':
          description: Unauthorized - missing or invalid JWT token
        '500':
          description: Internal Server Error
      security:
        - bearer: []
components:
  schemas:
    CreatePayinDto:
      properties:
        amount:
          description: >-
            Amount to deposit (as string to avoid floating-point precision
            issues). Must be greater than zero.
          example: '100.50'
          pattern: ^[0-9]+(.[0-9]{1,8})?$
          type: string
        clientRef:
          description: Client reference for idempotency - must be unique per client
          example: 609eddec-9b97-4f41-8db3-ef9342263418
          type: string
        country:
          description: Country code (ISO 3166-1 alpha-2)
          example: GB
          type: string
        currency:
          description: >-
            Currency code (ISO 4217). Case-insensitive — normalized to
            uppercase.
          example: EUR
          type: string
        description:
          description: Optional description for the deposit
          example: Account top-up
          maxLength: 500
          type: string
        email:
          description: >-
            Email of the user initiating the payin. Required for NGN currency to
            generate dynamic virtual accounts.
          example: john.doe@example.com
          type: string
        firstName:
          description: >-
            First name of the user initiating the payin. Required for NGN
            currency to generate dynamic virtual accounts.
          example: John
          type: string
        lastName:
          description: >-
            Last name of the user initiating the payin. Required for NGN
            currency to generate dynamic virtual accounts.
          example: Doe
          type: string
        method:
          description: Payment method to use for the deposit
          enum:
            - open_banking
            - manual_deposit
            - admin_deposit
            - virtual_account
            - crypto_deposit
            - bank_deposit
          example: open_banking
          type: string
        phoneNumber:
          description: >-
            Phone number of the user initiating the payin. Required for NGN
            currency to generate dynamic virtual accounts.
          example: '+2348012345678'
          type: string
        referenceId:
          description: Optional external reference ID
          example: INV-2024-001
          type: string
      required:
        - clientRef
        - amount
        - currency
      type: object
    PayinResponseDto:
      properties:
        amount:
          description: Deposit amount
          example: '100.50'
          type: string
        bic:
          description: >-
            BIC for manual deposits (if method is manual_deposit). For NGN
            payins, this contains the bank name assigned by the payin provider.
          example: DEUTDEFF
          type: string
        createdAt:
          description: Creation timestamp
          example: '2024-01-15T10:30:00Z'
          format: date-time
          type: string
        currency:
          description: Currency code
          example: EUR
          type: string
        description:
          description: Description of the deposit
          example: Account top-up
          type: string
        iban:
          description: >-
            IBAN for manual deposits (if method is manual_deposit). For NGN
            payins, this contains the virtual account number assigned by the
            payin provider.
          example: GB82WEST12345698765432
          type: string
        id:
          description: Unique identifier for the pay-in
          example: 123e4567-e89b-12d3-a456-426614174000
          format: uuid
          type: string
        metadata:
          additionalProperties: true
          description: >-
            Provider-specific metadata containing payment details. For NGN
            payins, contains virtual account information (accountNumber,
            bankName, accountName, providerReference). Structure varies by
            payment method and provider.
          example:
            accountName: Zuba Business Name
            accountNumber: '3234567890'
            bankName: Wema Bank
            expiresAt: '2024-01-16T10:30:00Z'
            providerReference: ONUS-REF-1706510200000
          type: object
        method:
          description: Payment method used
          enum:
            - open_banking
            - manual_deposit
            - admin_deposit
            - virtual_account
            - crypto_deposit
            - bank_deposit
          example: open_banking
          type: string
        redirectUrl:
          description: Redirect URL for open banking flow (if method is open_banking)
          example: https://bank.example.com/auth?token=abc123
          type: string
        reference:
          description: >-
            Payment reference. For NGN payins, this is the virtual account
            reference.
          example: PAYIN-2024-001
          type: string
        status:
          description: Current status of the pay-in
          enum:
            - pending
            - processing
            - completed
            - failed
            - cancelled
            - refunding
            - refunded
            - in_review
          example: pending
          type: string
        updatedAt:
          description: Last update timestamp
          example: '2024-01-15T10:35:00Z'
          format: date-time
          type: string
      required:
        - id
        - method
        - amount
        - currency
        - status
        - createdAt
        - updatedAt
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: Enter Auth0 JWT token
      scheme: bearer
      type: http

````