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

# List wallets

> A customer's credit per currency and credit unit: the credit on account, the usage not
invoiced yet and the balance left after it, with the wallet's alerts and automatic top-up. The
customer's own currency comes first, even when empty. With `subscription_id`, each wallet
counts only the credit that subscription can use.



## OpenAPI

````yaml https://api.meteroid.com/api-docs/openapi.json get /api/v1/customers/{id_or_alias}/wallets
openapi: 3.1.0
info:
  title: meteroid
  description: ''
  license:
    name: LicenseRef-Proprietary
    identifier: LicenseRef-Proprietary
  version: 0.1.0
servers: []
security: []
tags:
  - name: Meteroid
    description: Meteroid API
  - name: Add-ons
  - name: Batch Jobs
  - name: Budgets
    description: >-
      Beta: may change before general availability. Spending limits on a
      customer's usage, or one subscription's, per currency, with alerts at
      percentages of the amount.
    x-beta: true
  - name: Checkout Sessions
  - name: Checks
    description: >-
      Beta: may change before general availability. Whether a customer may
      consume more of a feature right now.
    x-beta: true
  - name: Connect
    description: Manage connected accounts (Express & Standard)
  - name: Coupons
  - name: Credit Notes
  - name: Credit units
    description: >-
      Custom denominations, such as "credits", that usage can be priced in and
      credit granted or sold in, instead of money.
  - name: Credits
    description: >-
      Prepaid credit: a customer's wallets, credit grants, ledger and top-ups.
      Promotional credit applies before tax like a discount; paid credit applies
      after tax like a payment.
  - name: Custom Properties
  - name: Customers
  - name: Entitlements
  - name: Events
  - name: Features
  - name: Invoices
  - name: Licenses
    description: >-
      Licenses for your customers' self-hosted installations: signed tokens
      carrying their plan's entitlements, activated and refreshed by the
      installation over the public licensing endpoints.
  - name: Metrics
  - name: OAuth
    description: OAuth 2.0 token endpoints (public, client-credentials auth)
  - name: OAuth Apps
    description: Manage OAuth applications for Connect integrations
  - name: Plans
  - name: Product Families
  - name: Products
  - name: Subscriptions
  - name: Usage
  - name: Usage costs
    description: >-
      Beta: may change before general availability. A customer's or a
      subscription's usage events and usage over time, with what they cost.
    x-beta: true
  - name: Webhook Endpoints
    description: Manage outbound webhook endpoints and inspect their deliveries
paths:
  /api/v1/customers/{id_or_alias}/wallets:
    get:
      tags:
        - Credits
      summary: List wallets
      description: >-
        A customer's credit per currency and credit unit: the credit on account,
        the usage not

        invoiced yet and the balance left after it, with the wallet's alerts and
        automatic top-up. The

        customer's own currency comes first, even when empty. With
        `subscription_id`, each wallet

        counts only the credit that subscription can use.
      operationId: list_wallets
      parameters:
        - name: id_or_alias
          in: path
          description: Customer ID or alias
          required: true
          schema:
            type: string
        - name: subscription_id
          in: query
          description: >-
            Only the credit this subscription (`sub_…`) can use: the credit that
            belongs to it and

            the customer's credit that belongs to no subscription. Every wallet
            is still listed.
          required: false
          schema:
            $ref: '#/components/schemas/SubscriptionId'
      responses:
        '200':
          description: The customer's wallets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletListResponse'
        '400':
          description: Invalid request, or the subscription belongs to another customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '404':
          description: Customer or subscription not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    SubscriptionId:
      type: string
      format: MeteroidId
      examples:
        - sub_7n42DGM5Tflk9n8mt7Fhc7
    WalletListResponse:
      type: object
      description: A customer's wallets, the customer's own currency first.
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Wallet'
    RestErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
    Wallet:
      type: object
      description: >-
        A customer's credit in one currency or credit unit. Amounts are minor
        units of it. Read with

        `subscription_id`, every amount counts only the credit that subscription
        can use.
      required:
        - credit_on_account
        - credit_on_account_usage_only
        - subscription_credit
        - upcoming_credit
        - low_balance_thresholds
        - usage_at_zero
        - pauses_at_zero
      properties:
        as_of:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When `balance` and `unbilled_usage` were computed. They follow usage
            within a few seconds

            while the balance is near zero or a threshold, and within a minute
            otherwise.
        auto_top_up:
          oneOf:
            - $ref: '#/components/schemas/AutoTopUp'
              description: >-
                Automatic top-up of the credit that applies to ALL charges;
                absent when never set.
            - type: 'null'
        balance:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            What the customer has left: `credit_on_account` minus the part of
            `unbilled_usage` that

            credit will pay. Never negative: usage beyond the credit stays in
            `unbilled_usage`, to be

            invoiced. Low-balance alerts use it; automatic top-ups watch only
            its part that pays any

            charge (credit that belongs to no subscription and is not limited to
            usage or products).

            Absent, with `unbilled_usage` and `as_of`, until the customer's
            usage has been priced once.

            With `subscription_id`: the credit that subscription can spend once
            every subscription's

            unbilled usage is paid, minus its own unbilled usage no credit pays
            (negative then), as

            `GET /wallets/check` reads it. Credit restricted to products it is
            not charged for is

            left out. Credit that belongs to no subscription counts in the
            balance of every

            subscription that can use it (see `shared_balance`): never add
            subscriptions' balances up.
        credit_on_account:
          type: integer
          format: int64
          description: >-
            The ledger total: credit granted and effective, not yet applied to
            an invoice or expired,

            whatever it applies to. Usage not invoiced yet is not deducted (see
            `balance`).
        credit_on_account_usage_only:
          type: integer
          format: int64
          description: The part of `credit_on_account` that pays only usage charges.
        credit_unit:
          type:
            - string
            - 'null'
          description: The credit unit (its code) the wallet holds; absent for a currency.
        credit_unit_precision:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Decimal places of `credit_unit`: amounts are integers of
            10^-precision credit.
          minimum: 0
        currency:
          oneOf:
            - $ref: '#/components/schemas/Currency'
              description: Absent for a credit unit wallet.
            - type: 'null'
        low_balance_thresholds:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Ascending, distinct, at most 5. `wallet.balance_low` fires once when
            `balance` falls below

            one; a drop below several at once fires once, for the lowest. All
            credit counts, including

            credit that belongs to a subscription or is limited to usage or
            products, which

            `wallet.depleted` leaves out: a wallet can be depleted without an
            alert firing.
        pauses_at_zero:
          type: boolean
          description: >-
            Usage stops as soon as the credit is used up, for at least one
            active subscription: by

            `usage_at_zero`, or by the plan of a subscription charging usage in
            this wallet.
        shared_balance:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            With `subscription_id` only: the part of `balance` that belongs to
            no subscription, which

            the customer's other subscriptions can spend too.
        subscription_credit:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionCredit'
          description: >-
            The part of `credit_on_account` that belongs to a subscription,
            which only that

            subscription's charges can use, per subscription. The rest pays any
            subscription.
        unbilled_usage:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Usage recorded and priced but not invoiced yet, tax included, in
            minor units: what the

            next invoices will charge for it, paid from credit as far as the
            credit goes. With

            `subscription_id`, that subscription's usage only; other
            subscriptions' usage paid from

            shared credit still lowers `balance`.
        unit_price:
          type:
            - string
            - 'null'
          description: >-
            Credit unit wallets: the price this customer agreed for one credit,
            in major units of

            `unit_price_currency`, as a decimal string (e.g. "0.0008").
            Purchases and automatic

            top-ups in that currency charge it instead of the list price, unless
            a purchase sets its

            own `unit_price`. Absent: the list price applies.
        unit_price_currency:
          oneOf:
            - $ref: '#/components/schemas/Currency'
              description: >-
                The currency of `unit_price`: the customer's currency when it
                was set. Absent with it.
            - type: 'null'
        upcoming_credit:
          type: integer
          format: int64
          description: Credit granted that takes effect later.
        usage_at_zero:
          $ref: '#/components/schemas/UsageAtZero'
          description: >-
            What this customer's usage does once the credit a subscription can
            use for it is used up

            (its own credit, credit that belongs to no subscription, and credit
            limited to the product:

            the `balance` of `GET /wallets/check`). `FOLLOW_PLAN` applies the
            "when credit runs out"

            rule of each subscription's plan.
    ErrorCode:
      type: string
      enum:
        - BAD_REQUEST
        - NOT_FOUND
        - CONFLICT
        - FORBIDDEN
        - UNAUTHORIZED
        - TOKEN_EXPIRED
        - TOO_MANY_REQUESTS
        - INTERNAL_SERVER_ERROR
    AutoTopUp:
      type: object
      description: >-
        Automatic top-up of the credit that applies to ALL charges: it charges
        the customer's payment

        method when the balance falls below `threshold`.
      required:
        - status
        - method
        - threshold
      properties:
        amount:
          type:
            - integer
            - 'null'
          format: int64
          description: 'FIXED only: credit bought each time, in minor units of the wallet.'
        customer_consent_attested_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When an operator attested that the customer agreed to automatic
            charges on exactly these

            terms. Absent when the customer confirmed them in their portal, or
            the terms changed since.
        daily_cap:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Most charged in a rolling day, tax included. For a credit unit
            wallet caps are money, in

            minor units of the customer's currency.
        last_error:
          type:
            - string
            - 'null'
          description: Why the last charge failed; may carry payment provider detail.
        last_succeeded_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The last charge that succeeded.
        maximum:
          type:
            - integer
            - 'null'
          format: int64
          description: Largest single charge, in the same money as `minimum`.
        method:
          $ref: '#/components/schemas/AutoTopUpMethod'
          description: FIXED buys `amount` each time; TO_TARGET buys back up to `target`.
        minimum:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Smallest single charge. For a credit unit wallet it is money (the
            price before tax, in

            minor units of the customer's currency), like the caps; the
            threshold, amount and target

            are credits.
        monthly_cap:
          type:
            - integer
            - 'null'
          format: int64
          description: Most charged in a calendar month (UTC), tax included.
        payment_method_id:
          type:
            - string
            - 'null'
          description: Absent charges the customer's default payment method.
        status:
          $ref: '#/components/schemas/AutoTopUpStatus'
          description: >-
            ACTIVE, DISABLED (terms kept) or SUSPENDED after repeated failed
            charges.
        suspended_at:
          type:
            - string
            - 'null'
          format: date-time
          description: 'Set while SUSPENDED: since when.'
        target:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            TO_TARGET only: the balance a top-up brings the wallet back to, in
            minor units.
        threshold:
          type: integer
          format: int64
          description: >-
            Tops up once the balance is at or below this, in minor units of the
            wallet.
    Currency:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNH
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - IRR
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
        - ZWL
      examples:
        - EUR
    SubscriptionCredit:
      type: object
      description: Credit on account that only one subscription can use.
      required:
        - subscription_id
        - credit_on_account
      properties:
        credit_on_account:
          type: integer
          format: int64
          description: In minor units of the wallet.
        subscription_id:
          type: string
    UsageAtZero:
      type: string
      description: >-
        What a customer's usage does once the credit it can use runs out: what
        the subscription's plan

        says (`FOLLOW_PLAN`), or always or never refused for this customer.
      enum:
        - FOLLOW_PLAN
        - ALWAYS_PAUSE
        - NEVER_PAUSE
    AutoTopUpMethod:
      type: string
      enum:
        - FIXED
        - TO_TARGET
    AutoTopUpStatus:
      type: string
      enum:
        - ACTIVE
        - DISABLED
        - SUSPENDED
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.