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

# Create a recipient

> Create a new recipient for transfers.



## OpenAPI

````yaml https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/recipients
openapi: 3.0.0
info:
  title: Busha API
  contact:
    email: developers@busha.co
  description: >
    ## Introduction

    The **Busha API** is designed to provide businesses with tools for
    borderless financial transactions and operations, enabling modern, global
    money management. It serves as the backbone for facilitating:

    - Creation and management of multi-currency balances

    - Retrieval of real-time cryptocurrency rates

    - Substantial data insights for business owners


    Whether you’re a product-driven fintech or a developer building
    integrations, this API significantly accelerates implementation while
    reducing financial complexities.

    For detailed guides on API integration, visit our [official
    documentation]().



    ## Authentication

    All API requests require a **Bearer Token** for authentication, passed in
    the `Authorization` header.

    Your authorization value is a base64 encoded value of your api key and your
    secret key.

    You can obtain API tokens via your Busha user or business account.
    Authentication is mandatory to ensure secure and authorized interactions
    with the API.

    The API keys from the dashboard provides a base64 encoding of the your
    authorization tokens.


    Your generated Key should look like this:

    `VURtNXhWcHueantkpaiewjo0S044MWsadfojienuoxRTiWDJaeWJaTGxxanZ3Ym10OU1RZnVWajVW=`


    Example Header:

    ``` curl

    Authorization: Bearer
    VURtNXhWcHueantkpaiewjo0S044MWsadfojienuoxRTiWDJaeWJaTGxxanZ3Ym10OU1RZnVWajVW=

    ```


    ## Error Handling

    #Standardized error responses ensure predictable interactions. Errors are
    detailed for easy debugging and understanding:

    | **Error Code** | **HTTP Status Code** | **Description** |

    | --- | --- | --- |

    | `bad_request` | 400 | Invalid input or malformed request |

    | `unauthorized` | 401 | Invalid or missing authentication |

    | `not_found` | 404 | Resource not found |

    | `service_unavailable` | 503 | Server error |


    Basic Error Example:

    ``` json

    {
      "error": {
        "name": "bad_request",
        "message": "Invalid input data"
      }
    }

    ```


    Schema Error Body Example:

    ``` json

    {
      "error": {
        "name": "bad_request",
        "message": "Invalid input data"
      },
      "schema": {
        "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification",
        "fix": "Ensure that the object being submitted, matches the schema correctly"
      }
    }

    ```


    Field Error Body Example:

    ``` json

    {
      "error": {
        "name": "bad_request",
        "message": "Invalid input data"
      },
      "fields": {
        "field1": [
          {
            "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification",
          },
        ],
        "field2": [
          {
            "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification",
          }
        ],
      }
    }

    ```


    ## Pagination

    Pagination uses cursors provided as:

    The API supports **cursor-based pagination** for endpoints with large
    datasets. Pagination uses a `next_cursor` and `previous_cursor` returned in
    the response.

    Example Response Format:

    ``` json

    {
      "current_entries_size": 10,
      "next_cursor": "base64_cursor_value",
      "previous_cursor": "base64_previous_cursor_value"
    }

    ```


    ## Rate Limiting

    Rate limits determine how many API calls can be made in a rolling minute.
    This ensures fair and optimized use of system resources.


    The rate limits allowed by each resource will be provided with the header:

    ```curl

    x-rate-limit 100

    ```

    If this header does not exist, then the rate limit is set at a default 100
    req/min


    Requests exceeding the allocated quota will receive a `429 Too Many
    Requests` response.


    ##  Common Parameters

    Common parameters enhance consistency across endpoints:
      | **Parameter Name** | **Location** | **Description** | **Example** |
      | --- | --- | --- | --- |
      | `X-BU-PROFILE-ID` | Header | User profile identifier | `BUS_qwejinoiuiqw93ejjw` |
      | `id` | Path | Unique NanoID identifier | `dpt_jweqafajsndiun34fd` |
      | `cursor` | Query | Pagination cursor | `base64_cursor_string` |

    #### Paginated Response Example
      ``` json
      {
        "status": "success",
        "message": "Data retrieved",
        "pagination": {
          "next_cursor": "value_for_next_page",
          "current_entries_size": 20
        },
        "data": [...]
      }
      ```
  version: 1.0.0
servers:
  - url: https://api.sandbox.busha.so
    description: Sandbox Environment
  - url: https://api.busha.io
    description: Production Environment
security: []
tags:
  - name: Balances
    description: Handles account balances across different currencies.
    x-displayName: Balances
  - name: Bills
    description: Lorem Ipsum
    x-displayName: Bills
  - name: Cards
    description: Lorem Ipsum
    x-displayName: Cards
  - name: Cashback
    description: Main tag for cashback service endpoints
    x-displayName: Cashback
  - name: Currencies
    description: >
      Endpoints to manage supported currencies, their properties, and network
      details.
    x-displayName: Currencies
  - name: Customers
    x-internal: false
    description: Handle customer requests and responses
    x-displayName: Customers
  - name: Files
    description: Provides APIs to handle files upload
    x-displayName: Files
  - name: Mandate
    x-displayName: Mandate
  - name: Miscellaneous
    description: Provides auxiliary APIs to complement and enhance other services.
    x-displayName: Miscellaneous
  - name: News
    description: News article endpoints
    x-displayName: News
  - name: Pairs
    description: Access trading pair information and rates
    x-displayName: Pairs
  - name: PaymentLinks
    description: Payment Links
    x-displayName: PaymentLinks
  - name: PaymentRequests
    description: Payment request
    x-displayName: PaymentRequests
  - name: Pledges
    description: Customer-authorized pledge lifecycle APIs
    x-displayName: Pledges
  - name: PriceAlerts
    description: Price alert management endpoints
    x-displayName: PriceAlerts
  - name: Quotes
    description: Handle quotes requests and responses
    x-displayName: Quotes
  - name: Recipients
    x-displayName: Recipients
  - name: Transactions
    x-displayName: Transactions
  - name: Transfers
    x-displayName: Transfers
  - name: Widget
    description: Widget operations
    x-displayName: Widget
paths:
  /v1/recipients:
    post:
      tags:
        - Recipients
      summary: Create a recipient
      description: Create a new recipient for transfers.
      operationId: createRecipient
      parameters:
        - $ref: '#/components/parameters/X-BU-Version'
        - $ref: '#/components/parameters/ProfileHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRecipientRequest'
            examples:
              legacy_response:
                summary: Recipient creation - Legacy
                value:
                  currency_id: NGN
                  country_id: NG
                  type: ngn_bank_transfer
                  legal_entity_type: business
                  fields:
                    - name: bank_name
                      value: Access Bank Nigeria
                    - name: account_number
                      value: '1234567890'
                    - name: bank_code
                      value: '000014'
                    - name: account_name
                      value: John Doe
              ngn:
                summary: Recipient creation NGN (2025-07-11)
                value:
                  currency: NGN
                  country_code: NG
                  type: ngn_bank
                  bank_name: UNITED BANK FOR AFRICA
                  bank_code: '000004'
                  account_number: '2134211381'
                  account_name: John Doe
              usd_ach:
                summary: Recipient creation USD - ACH (2025-07-11)
                value:
                  type: usd_bank
                  entity_type: personal
                  transfer_type: ach
                  account_name: Jane Smith
                  bank_name: Chase Bank
                  routing_number: '021000021'
                  account_number: '9876543210'
              usd_wire:
                summary: Recipient creation USD - Wire (2025-07-11)
                value:
                  type: usd_bank
                  entity_type: business
                  transfer_type: wire
                  account_name: Tech Corp LLC
                  bank_name: Bank of America
                  routing_number: '026009593'
                  account_number: '1122334455'
              usd_swift:
                summary: Recipient creation USD - SWIFT (2025-07-11)
                value:
                  type: usd_bank
                  entity_type: business
                  transfer_type: swift
                  account_name: Global Corp Ltd
                  iban: GB29NWBK60161331926819
                  swift_code: CHASUS33XXX
                  bank_name: Bank of International Transfers
                  recipient_address: 123 Hauptstrasse, Berlin, 10115, Germany
                  intermediary_bank_name: Intermediary Global Bank
                  intermediary_bank_address: 456 Avenue of Banks, Zurich
                  intermediary_swift_code: CHASUS33XXX
              kes:
                summary: Recipient creation MPESA MOBILE MONEY (2025-07-11)
                value:
                  currency: KES
                  country_code: KE
                  type: mpesa_mobile_money
                  phone_number: +254 712345678
                  account_name: Business Account
              kes_business_mobile_money_till:
                summary: Recipient creation BUSINESS MOBILE MONEY - Till (2025-07-11)
                value:
                  currency: KES
                  country_code: KE
                  type: till
                  till_number: '20029'
                  account_name: Busines Name
              kes_business_mobile_money_paybill:
                summary: >-
                  Recipient creation BUSINESS MOBILE MONEY - Paybill
                  (2025-07-11)
                value:
                  currency: KES
                  country_code: KE
                  type: paybill
                  paybill: '254701548525'
                  account_number: '63902'
                  account_name: Business Account
              crypto_btc:
                summary: Recipient creation BTC (2025-07-11)
                value:
                  type: crypto
                  address_label: My Bitcoin Wallet
                  network: BTC
                  address: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
              crypto_usdt_on_eth:
                summary: Recipient creation USDT ON ETH NETWORK (2025-07-11)
                value:
                  type: crypto
                  address_label: My Ethereum Wallet
                  network: ETH
                  address: '0x742d35Cc6543C4532f5D2b8d9a2b2A1234567890'
              crypto_stellar_lumens_with_memo:
                summary: Recipient creation STELLAR LUMENS (2025-07-11)
                value:
                  type: crypto
                  address_label: My Stellar Wallet
                  network: XLM
                  address: GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A
                  memo: '123456789'
      responses:
        '201':
          description: Recipient created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecipientResponse'
              examples:
                legacy_response:
                  summary: Recipient response - Legacy
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      object: recipient
                      id: 8014c2ee-c70f-4c72-8d9f-c8b9d708a688
                      user_id: b8277d1c-1bde-46ef-92ce-ebb4752eede5
                      profile_id: b8277d1c-1bde-46ef-92ce-ebb4752eede5
                      currency_id: NGN
                      country_id: NG
                      type: ngn_bank_transfer
                      legal_entity_type: business
                      owned_by_customer: true
                      active: true
                      created_at: '2024-05-16T13:06:31.409336+01:00'
                      updated_at: '2024-05-16T13:06:31.409336+01:00'
                      fields:
                        - value: Access Bank Nigeria
                          display_name: Bank Name
                          name: bank_name
                          is_copyable: false
                          is_visible: true
                          required: true
                        - value: '0013246052'
                          display_name: Account Number
                          name: account_number
                          is_copyable: false
                          is_visible: true
                          required: true
                ngn:
                  summary: Recipient response NGN (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 687560e1255ff9424db5e4c5
                      profile_id: aa909417-099c-429a-9d74-89e9b5e8891c
                      account_name: INU JOHN
                      account_number: '2134211381'
                      active: true
                      bank_code: '000004'
                      bank_name: 9 PAYMENT SOLUTIONS BANK
                      category: bank
                      country_code: NG
                      currency: NGN
                      object: recipients
                      owned_by_customer: true
                      type: ngn_bank
                usd_ach:
                  summary: Recipient response USD - ACH (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 687564c9255ff9424db5e4c6
                      profile_id: aa909417-099c-429a-9d74-89e9b5e8891c
                      account_name: Jane Smith
                      account_number: '9876543210'
                      active: true
                      bank_name: Chase Bank
                      category: bank
                      entity_type: personal
                      object: recipients
                      owned_by_customer: true
                      routing_number: '021000021'
                      transfer_type: ach
                      type: usd_bank
                usd_wire:
                  summary: Recipient response USD - WIRE (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 687564c9255ff9424db5e4c7
                      profile_id: aa909417-099c-429a-9d74-89e9b5e8891c
                      account_name: Tech Corp LLC
                      account_number: '1122334455'
                      active: true
                      bank_name: Bank of America
                      category: bank
                      entity_type: business
                      object: recipients
                      owned_by_customer: true
                      routing_number: '026009593'
                      transfer_type: wire
                      type: usd_bank
                usd_swift:
                  summary: Recipient response USD - SWIFT (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 68756991255ff9424db5e4e0
                      profile_id: aa909417-099c-429a-9d74-89e9b5e8891c
                      account_name: Global Corp Ltd
                      active: true
                      bank_name: Bank of International Transfers
                      category: bank
                      entity_type: business
                      iban: GB29NWBK60161331926819
                      intermediary_bank_address: 456 Avenue of Banks, Zurich
                      intermediary_bank_name: Intermediary Global Bank
                      intermediary_swift_code: CHASUS33XXX
                      object: recipients
                      owned_by_customer: true
                      recipient_address: 123 Hauptstrasse, Berlin, 10115, Germany
                      swift_code: CHASUS33XXX
                      transfer_type: swift
                      type: usd_bank
                kes:
                  summary: Recipient response MPESA MOBILE MONEY (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 68756bbc255ff9424db5e4e2
                      profile_id: aa909417-099c-429a-9d74-89e9b5e8891c
                      account_name: Samuel Kiprotich
                      active: true
                      category: mpesa_mobile_money
                      country_code: KE
                      currency: KES
                      object: recipients
                      owned_by_customer: true
                      phone_number: +254 712345678
                      type: mpesa_mobile_money
                kes_business_mobile_money_till:
                  summary: Recipient response BUSINESS MOBILE MONEY - Till (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 6984a536631abd8caf69cf45
                      profile_id: 01b044c7-dff6-464c-9792-f49b3c3c02c3
                      account_name: Account Name
                      active: true
                      category: mobile_money
                      country_code: KE
                      currency: KES
                      object: recipients
                      owned_by_customer: true
                      paybill: '20029'
                      type: paybill
                kes_business_mobile_money_paybill:
                  summary: >-
                    Recipient response BUSINESS MOBILE MONEY - Paybill
                    (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 6984a536631abd8caf69cf45
                      profile_id: 01b044c7-dff6-464c-9792-f49b3c3c02c3
                      account_name: Samuel Kiprotich
                      account_number: '63902'
                      active: true
                      category: mobile_money
                      country_code: KE
                      currency: KES
                      object: recipients
                      owned_by_customer: true
                      paybill: '254701548525'
                      type: paybill
                crypto_btc:
                  summary: Recipient response BTC (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 68756cd6255ff9424db5e4e3
                      profile_id: aa909417-099c-429a-9d74-89e9b5e8891c
                      active: true
                      address: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
                      address_label: My Bitcoin Wallet
                      category: crypto
                      network: BTC
                      object: recipients
                      owned_by_customer: true
                      type: crypto
                crypto_usdt_on_eth:
                  summary: Recipient response USDT ON ETH NETWORK (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 68756df6255ff9424db5e4e5
                      profile_id: aa909417-099c-429a-9d74-89e9b5e8891c
                      active: true
                      address: '0x742d35Cc6543C4532f5D2b8d9a2b2A1234567890'
                      address_label: My Ethereum Wallet
                      category: crypto
                      network: ETH
                      object: recipients
                      owned_by_customer: true
                      type: crypto
                crypto_stellar_lumens_with_memo:
                  summary: Recipient response STELLAR LUMENS (2025-07-11)
                  value:
                    status: success
                    message: Recipient created successfully
                    data:
                      id: 68756eb4255ff9424db5e4e7
                      profile_id: aa909417-099c-429a-9d74-89e9b5e8891c
                      active: true
                      address: GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A
                      address_label: My Stellar Wallet
                      category: crypto
                      memo: '123456789'
                      network: XLM
                      object: recipients
                      owned_by_customer: true
                      type: crypto
        4XX:
          $ref: '#/components/responses/RecipientError4XX'
        5XX:
          $ref: '#/components/responses/RecipientError5XX'
      security:
        - Auth:
            - recipients:write
            - api:write
components:
  parameters:
    X-BU-Version:
      in: header
      name: X-BU-Version
      description: The API version to use for this request.
      required: false
      schema:
        type: string
        default: '2025-07-11'
        example: '2025-07-11'
        enum:
          - '2025-06-01'
          - '2025-07-11'
    ProfileHeader:
      in: header
      name: X-BU-PROFILE-ID
      required: false
      description: User profile header
      schema:
        type: string
        example: BUS_YOK8tp5Zga01qOKEsqp07
  schemas:
    CreateRecipientRequest:
      oneOf:
        - $ref: '#/components/schemas/RecipientCreate-2025-07-11'
        - type: object
          deprecated: true
          required:
            - currency_id
            - country_id
            - type
            - legal_entity_type
            - fields
          properties:
            currency_id:
              $ref: '#/components/schemas/Currency'
            country_id:
              $ref: '#/components/schemas/CountryID'
            type:
              type: string
              description: Type of recipient account
              example: ngn_bank_transfer
            legal_entity_type:
              type: string
              description: Type of legal entity
              enum:
                - business
                - personal
              example: business
            fields:
              type: array
              description: List of fields containing recipient details
              items:
                type: object
                required:
                  - name
                  - value
                properties:
                  name:
                    type: string
                    description: Field identifier
                    example: bank_name
                  value:
                    type: string
                    description: Field value
                    example: Access Bank Nigeria
    RecipientResponse:
      allOf:
        - $ref: '#/components/schemas/BaseSchema'
        - type: object
          required:
            - data
          properties:
            data:
              oneOf:
                - $ref: '#/components/schemas/Recipient'
                - $ref: '#/components/schemas/Recipient-2025-07-11'
    RecipientCreate-2025-07-11:
      allOf:
        - $ref: '#/components/schemas/RecipientBase-2025-07-11'
        - type: object
          properties:
            one_time:
              type: boolean
              description: >-
                Whether the recipient is a one-time recipient. One-time
                recipients are stored but not returned in list or get responses.
    Currency:
      type: string
      x-order: 20
      example: BTC
      format: string
      maxLength: 10
      minLength: 1
      description: A valid currency
      x-oapi-codegen-extra-tags:
        validate: required|min_len:1|max_len:10
        filter: trim|upper
    CountryID:
      type: string
      example: NG
      format: alpha2
      description: A valid country id
      minLength: 2
      maxLength: 2
      x-oapi-codegen-extra-tags:
        validate: alpha2
    BaseSchema:
      description: General response Values
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          x-order: 1
          x-go-type: string
          enum:
            - success
            - error
          example: success
        message:
          type: string
          x-order: 2
          example: message for success
    Recipient:
      deprecated: true
      type: object
      required:
        - object
        - id
        - user_id
        - profile_id
        - type
        - legal_entity_type
        - owned_by_customer
        - active
        - created_at
        - updated_at
        - fields
      properties:
        object:
          type: string
          description: Type of the object
          example: recipient
        id:
          $ref: '#/components/schemas/ID'
        user_id:
          $ref: '#/components/schemas/ID'
        profile_id:
          $ref: '#/components/schemas/ID'
        currency_id:
          $ref: '#/components/schemas/Currency'
        country_id:
          $ref: '#/components/schemas/CountryID'
        type:
          type: string
          description: Type of recipient account
          example: ngn_bank_transfer
        legal_entity_type:
          type: string
          description: Type of legal entity
          enum:
            - business
            - personal
          example: business
        owned_by_customer:
          type: boolean
          description: Whether the recipient is owned by the customer
          example: true
        active:
          type: boolean
          description: Whether the recipient is active
          example: true
        created_at:
          type: string
          format: date-time
          description: Timestamp when the recipient was created
          example: '2024-05-16T13:06:31.409336+01:00'
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the recipient was last updated
          example: '2024-05-16T13:06:31.409336+01:00'
        fields:
          type: array
          description: List of fields containing recipient details
          items:
            $ref: '#/components/schemas/RecipientField'
    Recipient-2025-07-11:
      allOf:
        - $ref: '#/components/schemas/RecipientBase-2025-07-11'
        - type: object
          required:
            - object
            - id
            - profile_id
            - active
            - owned_by_customer
            - type
            - category
          properties:
            object:
              type: string
              description: Type of object
              example: recipient
            id:
              $ref: '#/components/schemas/ResourceID'
            profile_id:
              $ref: '#/components/schemas/NanoID'
            active:
              type: boolean
              description: Whether the recipient is active
            owned_by_customer:
              type: boolean
              description: Whether the recipient is owned by the customer
            category:
              type: string
              description: Category of recipient
              enum:
                - bank
                - mobile_money
                - crypto
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - name
            - message
          properties:
            name:
              type: string
              x-order: 40
              example: bad_request
            message:
              type: string
              example: Invalid Request
        fields:
          type: object
        schema:
          type: array
          items:
            type: object
      example:
        error:
          name: bad_request
          message: Invalid Request
    RecipientBase-2025-07-11:
      type: object
      required:
        - type
      properties:
        channel:
          type: string
          description: Channel for the transfer (business_mobile_money only)
          x-oapi-codegen-extra-tags:
            mapstructure: channel,omitempty
        currency:
          type: string
          description: Currency code for the recipient
          x-oapi-codegen-extra-tags:
            mapstructure: currency,omitempty
        country_code:
          type: string
          description: Country code for the recipient
          x-oapi-codegen-extra-tags:
            mapstructure: country_code,omitempty
        type:
          type: string
          description: Type of recipient account
          enum:
            - ngn_bank
            - kes_bank
            - usd_bank
            - gbp_bank
            - mpesa_mobile_money
            - mtn_mobile_money
            - crypto
            - paybill
            - till
          x-oapi-codegen-extra-tags:
            mapstructure: ',omitempty'
        entity_type:
          type: string
          additionalProperties: true
          description: Type of legal entity (for US, GB)
          enum:
            - personal
            - business
          x-oapi-codegen-extra-tags:
            mapstructure: entity_type,omitempty
        transfer_type:
          type: string
          additionalProperties: true
          description: Type of transfer (for US)
          enum:
            - ach
            - wire
            - swift
          x-oapi-codegen-extra-tags:
            mapstructure: transfer_type,omitempty
        address_label:
          type: string
          description: Name of the wallet (for crypto)
          x-oapi-codegen-extra-tags:
            mapstructure: wallet_name,omitempty
        account_name:
          type: string
          description: Name on the account
          x-oapi-codegen-extra-tags:
            mapstructure: account_name,omitempty
        email:
          type: string
          format: email
          description: Email associated with the recipient
          x-oapi-codegen-extra-tags:
            mapstructure: email,omitempty
        bank_name:
          type: string
          description: Name of the bank (for NG, US, GB)
          x-oapi-codegen-extra-tags:
            mapstructure: bank_name,omitempty
        bank_code:
          type: string
          description: Bank code (for NG only)
          x-oapi-codegen-extra-tags:
            mapstructure: bank_code,omitempty
        sort_code:
          type: string
          description: Sort code (for GB only)
          x-oapi-codegen-extra-tags:
            mapstructure: sort_code,omitempty
        routing_number:
          type: string
          description: Routing number (for US domestic ACH/Wire)
          x-oapi-codegen-extra-tags:
            mapstructure: routing_number,omitempty
        swift_code:
          type: string
          description: SWIFT/BIC code (for international transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: swift_code,omitempty
        account_number:
          type: string
          description: Account number (for domestic transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: account_number,omitempty
        till_number:
          type: string
          description: Till number (for domestic transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: till_number,omitempty
        paybill:
          type: string
          description: Paybill (for domestic transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: paybill,omitempty
        iban:
          type: string
          description: IBAN (for international transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: iban,omitempty
        phone_number:
          $ref: '#/components/schemas/PhoneField'
        network:
          type: string
          description: Blockchain network (for crypto transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: network,omitempty
        address:
          type: string
          description: Wallet address (for crypto transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: address,omitempty
        memo:
          type: string
          description: Tag/memo (for crypto transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: memo,omitempty
        recipient_address:
          type: string
          description: Address details (for international transfers)
          x-oapi-codegen-extra-tags:
            mapstructure: recipient_address,omitempty
        intermediary_bank_name:
          type: string
          example: JPMorgan Chase Bank
          x-oapi-codegen-extra-tags:
            mapstructure: intermediary_bank_name,omitempty
        intermediary_bank_address:
          type: string
          example: 270 Park Avenue, New York, NY 10017
          x-oapi-codegen-extra-tags:
            mapstructure: intermediary_bank_address,omitempty
        intermediary_swift_code:
          type: string
          example: CHASUS33
          x-oapi-codegen-extra-tags:
            mapstructure: intermediary_swift_code,omitempty
        busha_wallet:
          type: boolean
          description: Whether the recipient is a a busha wallet
          x-oapi-codegen-extra-tags:
            mapstructure: busha_wallet,omitempty
    ID:
      type: string
      x-order: 4
      example: platform_123456
      format: nanoid
      description: A valid id that supports uuid and nanoid
      x-oapi-codegen-extra-tags:
        validate: required|nanoid|string
    RecipientField:
      type: object
      required:
        - value
        - display_name
        - name
        - is_copyable
        - is_visible
        - required
      properties:
        value:
          type: string
          description: The value of the recipient field
          example: Access Bank Nigeria
        display_name:
          type: string
          description: Human-readable name of the field
          example: Bank Name
        name:
          type: string
          maxLength: 255
          x-oapi-codegen-extra-tags:
            validate: max_len:255
          description: System identifier for the field
          example: bank_name
        is_copyable:
          type: boolean
          description: Whether the field value can be copied
          example: false
        is_visible:
          type: boolean
          description: Whether the field should be displayed
          example: true
        required:
          type: boolean
          description: Whether the field is required
          example: true
    ResourceID:
      type: string
      x-order: 1
      example: bus_123456789
      format: string
      description: A valid id
      x-oapi-codegen-extra-tags:
        validate: required|nanoid
    NanoID:
      type: string
      x-order: 2
      example: bus_123456789
      format: nanoid
      description: A valid id
      x-oapi-codegen-extra-tags:
        validate: required|nanoid
    PhoneField:
      type: string
      example: '+2348012345678'
      format: phone
      description: A valid phone number. format `{{calling_code}}{{number}}`
      x-oapi-codegen-extra-tags:
        validate: phone
        filter: phone
        mapstructure: phone_number,omitempty
  responses:
    RecipientError4XX:
      description: Recipient Error sample
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            default:
              $ref: '#/components/examples/DefaultError'
            not_found_error:
              $ref: '#/components/examples/NotFoundError'
            unauthorized_error:
              $ref: '#/components/examples/UnAuthorizedError'
            request_validation_error:
              $ref: '#/components/examples/RequestValidationError'
            schema_validation_error:
              $ref: '#/components/examples/SchemaValidationError'
    RecipientError5XX:
      description: Server error when processing the recipient request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal_server_error:
              $ref: '#/components/examples/InternalServerError'
            service_unavailable_error:
              $ref: '#/components/examples/ServiceUnavailableError'
  examples:
    DefaultError:
      description: Default error
      value:
        error:
          name: bad_request
          message: Invalid request
    NotFoundError:
      description: Not Found error
      value:
        error:
          name: resource_not_found
          message: Resource Not Found
    UnAuthorizedError:
      description: Unauthorized Error
      value:
        error:
          name: unauthorized
          message: Unauthorized request
    RequestValidationError:
      description: Request Validation error example
      value:
        error:
          name: request_validation
          message: Validation error
        fields:
          field1:
            - reason: One of target and source amount must be set
          field2:
            - reason: One of target and source amount must be set
    SchemaValidationError:
      description: Schema validation error example
      value:
        error:
          name: schema_validation
          message: Error Validating Requests
        schema:
          - reason: >-
              The request body is defined as an object. However, it does not
              meet the schema requirements of the specification
            fix: >-
              Ensure that the object being submitted, matches the schema
              correctly
            schema_validation_error:
              - 'minLength: got 3, want 12'
    InternalServerError:
      description: Internal Server Error
      value:
        error:
          name: internal_server_error
          message: Internal Server Error
    ServiceUnavailableError:
      description: Service Unavailable Error
      value:
        error:
          name: service_unavailable
          message: Service Unavailable
  securitySchemes:
    Auth:
      type: http
      scheme: bearer
      description: Bearer Authentication

````