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

# Get user's prepaid balance

> Retrieves the current prepaid balance for a specific user. Returns a breakdown of balances with their sources (e.g. Credit, Voucher) and expiry dates, as well as a total balance.



## OpenAPI

````yaml reference/openapi.json GET /drive/v1/users/{userId}/prepaid
openapi: 3.1.0
info:
  title: Drive API
  version: 1.0.0
  description: >-
    The Drive API provides comprehensive access to Plugsurfing's charging
    infrastructure network. It enables you to manage users, charging keys,
    search for charging locations, handle payments, and control charging
    sessions.
servers:
  - url: https://{environment}.plugsurfing.com
    variables:
      environment:
        enum:
          - drive-api-stage
        default: drive-api-stage
        description: >-
          API environment - use drive-api-stage for testing and drive-api for
          production
security: []
tags:
  - name: Geosearch
    description: >-
      Search and retrieve detailed information about charging locations and
      stations
  - name: Users
    description: >-
      Manage user accounts including creation, retrieval, updates, and deletion.
      Handles user-specific data and preferences.
  - name: Charging Keys
    description: >-
      Manage physical and virtual charging keys including creation, activation,
      updates, and status management. Essential for user access to charging
      stations.
  - name: Sessions
    description: >-
      Access and manage charging session data including history, status, and
      detailed session information
  - name: Remote Charging
    description: >-
      Control charging sessions remotely including starting and stopping
      sessions, and monitoring session status
  - name: Payment Options
    description: >-
      Manage payment methods and handle transaction processing for charging
      services
  - name: User Groups
    description: Manage user group memberships
  - name: Vouchers
    description: Redeem vouchers
  - name: Charging Key Orders
    description: Handle the ordering and fulfillment process for physical charging keys
  - name: EMP Charging Keys
    description: E-Mobility Provider specific endpoints for managing charging keys
  - name: EMP Geosearch
    description: E-Mobility Provider specific endpoints for location search and information
  - name: EMP Orders
    description: E-Mobility Provider specific endpoints for managing orders
  - name: EMP Sessions
    description: E-Mobility Provider specific endpoints for managing charging sessions
  - name: EMP Fleets
    description: E-Mobility Provider specific endpoints for managing fleets
paths:
  /drive/v1/users/{userId}/prepaid:
    get:
      tags:
        - Payment Options
      summary: Get user's prepaid balance
      description: >-
        Retrieves the current prepaid balance for a specific user. Returns a
        breakdown of balances with their sources (e.g. Credit, Voucher) and
        expiry dates, as well as a total balance.
      operationId: listPrepaid
      parameters:
        - name: userId
          in: path
          example: 6f36dc9b-446f-462b-aae0-95c7636d5c6c
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepaidBalance'
              example:
                balanceTotal:
                  amountMinorUnits: 1000
                  currency: EUR
                balances:
                  - expiryDate: '2024-12-31T23:59:59Z'
                    amountMinorUnits: 1000
                    currency: EUR
                    source: Credit
                    initialAmountMinorUnits: 1000
        '404':
          description: User not found or user has no prepaid balance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Resource not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Resource not found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PrepaidBalance:
      type: object
      required:
        - balanceTotal
        - balances
      properties:
        balanceTotal:
          type: object
          required:
            - amountMinorUnits
            - currency
          description: The total prepaid balance across all sources and validity periods
          properties:
            amountMinorUnits:
              type: integer
              description: >-
                Total balance in minor currency units (e.g., cents for EUR/USD).
                For example, 1000 represents 10.00 in the specified currency.
              example: 1000
            currency:
              type: string
              description: Three-letter currency code (ISO 4217)
              example: EUR
        balances:
          type: array
          description: Detailed breakdown of prepaid balance by source and validity period
          items:
            type: object
            properties:
              expiryDate:
                type: string
                format: date-time
                description: >-
                  When this balance portion will expire. After this date, the
                  amount will no longer be available for use.
                example: '2024-12-31T23:59:59Z'
              amountMinorUnits:
                type: integer
                description: Current balance amount in minor currency units
                example: 1000
              currency:
                type: string
                description: Three-letter currency code (ISO 4217)
                example: EUR
              source:
                type: string
                description: >-
                  Origin of this balance portion (e.g., 'Credit' for topped-up
                  amounts, 'Voucher' for promotional credits)
                example: Credit
              initialAmountMinorUnits:
                type: integer
                description: >-
                  Original amount when this balance portion was added, in minor
                  currency units
                example: 1000
      description: Current prepaid balance information for a user.
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````

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