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

# Create a wallet

> Creates a new wallet for a customer. Wallets hold a balance in a single currency and can optionally be restricted to a specific set of products.



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json post /wallets
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Insights
  - name: Invoices
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Wallet Grants
  - name: Wallets
paths:
  /wallets:
    post:
      tags:
        - Wallets
      summary: Create a wallet
      description: >-
        Creates a new wallet for a customer. Wallets hold a balance in a single
        currency and can optionally be restricted to a specific set of products.
      operationId: create-wallet
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
        - in: header
          name: Idempotency-Key
          schema:
            description: >-
              A unique string used to ensure the request is processed exactly
              once. If you retry a request with the same idempotency key within
              24 hours, the original response is returned without re-executing
              the operation.
            example: ik_a1b2c3d4e5f6
            maxLength: 255
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWalletRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletResponse'
          description: Success
          headers:
            Idempotency-Key:
              description: Echo of the idempotency key provided in the request
              schema:
                type: string
            Idempotent-Replayed:
              description: >-
                Whether this response was replayed from a previous request
                (true) or freshly executed (false)
              schema:
                type: boolean
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Conflict — a request with this idempotency key is currently being
            processed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    CreateWalletRequest:
      properties:
        currency:
          description: Currency code
          example: USD
          type: string
        customer_id:
          description: Identifier of the customer
          example: cust_01H2ABC
          type: string
        name:
          description: Name of the wallet
          example: Main Wallet
          type: string
        product_ids:
          description: Product IDs that can be purchased with this wallet
          items:
            type: string
          type: array
      required:
        - currency
        - customer_id
        - name
      type: object
    WalletResponse:
      properties:
        active:
          description: Whether the wallet is active
          example: true
          type: boolean
        created_at:
          description: Timestamp when the wallet was created
          example: '2026-04-01T10:00:00Z'
          format: date-time
          type: string
        currency:
          description: Currency code
          example: USD
          type: string
        current_balance:
          description: Current balance of the wallet
          type: string
        customer_id:
          description: Identifier of the customer that owns this wallet
          example: cust_01H2ABC
          type: string
        id:
          description: Unique identifier for the wallet
          example: wlt_01H1VECT
          type: string
        name:
          description: Name of the wallet
          example: Main Wallet
          type: string
        product_ids:
          description: Product IDs that can be purchased with this wallet
          items:
            type: string
          type: array
        updated_at:
          description: Timestamp when the wallet was last updated
          example: '2026-04-01T12:30:00Z'
          format: date-time
          type: string
      required:
        - active
        - created_at
        - currency
        - current_balance
        - customer_id
        - id
        - name
        - updated_at
      type: object
    ErrorResponse:
      properties:
        detail:
          type: string
        status:
          format: int64
          type: integer
      required:
        - status
        - detail
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````