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

# Create Wallet

> API reference for creating wallets (both merchant and customer)

Creates a new wallet for either merchant or customer.

### Key Features:

* Supports both STABLECOIN (with network) and FIAT wallets
* `customer_id` is optional (null for merchant wallets)
* Automatic network validation based on currency type
* Returns complete wallet details with addresses (for crypto)

### Request Body:

**Customer STABLECOIN Wallet**:

```json theme={null}
{
  "customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
  "currency": "USDC",
  "network": "erc20",
  "description": "my USDC account"
}
```

**Customer FIAT Wallet**:

```json theme={null}
{
  "customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
  "currency": "CAD",
  "description": "my cad account"
}
```

**Merchant STABLECOIN Wallet**:

```json theme={null}
{
  "currency": "USDC",
  "network": "polygon",
  "description": "merchant USDC account"
}
```

**Merchant FIAT Wallet**:

```json theme={null}
{
  "currency": "CAD",
  "description": "merchant CAD account"
}
```


## OpenAPI

````yaml POST /wallets
openapi: 3.0.0
info:
  title: 'StableStack: API Service'
  description: "# Overview\n\n##  Introduction\n\nStableStack offers an API first, last mile payment orchestration + liquidity router built with stablecoins. Stablecoin layer integrated into your existing payment flow, with smart accounts and blockchain abstraction. Go between digital and fiat currencies in minutes.\n\n## Getting Help\n\nWe're excited to have you build with us! If you're integrating, we will set up a communication channel. This will enable our teams to easily collaborate and ensure you launch as quickly as possible.\n\nPlease reach out to us at\_[hello@stablestack.xyz](https://mailto:hello@stablestack.xyz)\_for any questions or concerns."
  version: 1.0.0
servers:
  - url: https://api-staging.stablestack.com/api
    description: StableStack API
security: []
tags:
  - name: customers
  - name: customers > kyc
  - name: payouts
  - name: banks
  - name: transactions
  - name: wallets
  - name: assets
  - name: swap
paths:
  /wallets:
    post:
      tags:
        - wallets
      summary: Create wallet (merchant or customer)
      description: |
        Creates a new wallet for either merchant or customer.
        - For customer wallets: include customer_id
        - For STABLECOIN: network is required
        - For FIAT: network must be omitted
      parameters:
        - name: x-api-key
          in: header
          schema:
            type: string
          required: true
          example: ''
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - currency
                - description
              properties:
                customer_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: Required for customer wallets, omit for merchant wallets
                  example: 85b148ab-3f6b-4d55-917f-3c8de668a48e
                currency:
                  type: string
                  enum:
                    - USDC
                    - ZAR
                  example: USDC
                  description: Currency code
                network:
                  type: string
                  nullable: true
                  enum:
                    - erc20
                    - polygon
                  example: erc20
                  description: Required for STABLECOIN only
                description:
                  type: string
                  maxLength: 255
                  example: My wallet
                  description: Optional description (Recommended)
      responses:
        '201':
          description: Wallet created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 49468947-4006-4b9a-bd96-f6b0d0210ad3
                      asset_type:
                        type: string
                        enum:
                          - STABLECOIN
                          - FIAT
                        example: STABLECOIN
                      currency:
                        type: string
                        example: USDC
                      balance:
                        type: string
                        example: '0.00000000'
                      description:
                        type: string
                        nullable: true
                        example: My USDC wallet
                      status:
                        type: string
                        example: active
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      customer_id:
                        type: string
                        format: uuid
                        nullable: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            crypto_wallet_id:
                              type: string
                              format: uuid
                            address:
                              type: string
                            network:
                              type: string
                            created_at:
                              type: string
                              format: date-time
              examples:
                stablecoin:
                  value:
                    status: success
                    data:
                      id: 49468947-4006-4b9a-bd96-f6b0d0210ad3
                      asset_type: STABLECOIN
                      currency: USDC
                      balance: '0.00000000'
                      description: my erc account
                      status: active
                      created_at: '2025-05-01T21:04:31.928Z'
                      updated_at: '2025-05-01T21:04:31.928Z'
                      customer_id: 85b148ab-3f6b-4d55-917f-3c8de668a48e
                      addresses:
                        - id: 2381eeac-a592-4992-8bb9-4286634a0e94
                          crypto_wallet_id: 49468947-4006-4b9a-bd96-f6b0d0210ad3
                          address: 0xDt541923E23DcE32d1A346e96558dA89f87WD1aB
                          network: erc20
                          created_at: '2025-05-01T21:04:32.179Z'
                fiat:
                  value:
                    status: success
                    data:
                      id: 2acf9413-4db9-4602-9b91-22357b256e51
                      asset_type: FIAT
                      currency: CAD
                      balance: '0.00'
                      description: my cad account
                      status: pending
                      created_at: '2025-05-12T16:53:15.383Z'
                      updated_at: '2025-05-12T16:53:15.383Z'
                      customer_id: null
                      addresses: []
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: failed
                  message:
                    type: string
                    example: Validation error
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          example: field
                        value:
                          type: string
                          example: ''
                        msg:
                          type: string
                          example: Network is required for STABLECOIN wallets
                        path:
                          type: string
                          example: network
                        location:
                          type: string
                          example: body
              examples:
                networkError:
                  value:
                    status: failed
                    message: Validation error
                    errors:
                      - type: field
                        value: ''
                        msg: Network is required for STABLECOIN wallets
                        path: network
                        location: body
                currencyError:
                  value:
                    status: failed
                    message: Validation error
                    errors:
                      - type: field
                        value: ''
                        msg: Currency is required
                        path: currency
                        location: body

````