# Get wallet balance

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/wallets/{wallet_id}/balance:
    get:
      summary: Get wallet balance
      deprecated: false
      description: >-
        Return the current available balance for a wallet in both major and
        minor units.
      operationId: get-wallet-balance
      tags:
        - Vrtx Closed loop/Wallets
        - Wallets
      parameters:
        - name: wallet_id
          in: path
          description: Wallet ID issued by the closed-loop service.
          required: true
          example: 622ea233-3f21-450f-8758-e42cdd4e5e74
          schema:
            type: string
      responses:
        '200':
          description: Balance returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletBalanceResponse'
              examples:
                Balance:
                  summary: Balance
                  value:
                    wallet_id: 622ea233-3f21-450f-8758-e42cdd4e5e74
                    balance: '250.00'
                    balance_minor: 25000
                    currency: SAR
          headers: {}
          x-apidog-name: OK
        '401':
          description: Not Authorized
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ErrorExample:
                  summary: ErrorExample
                  value:
                    error_message: You are not authorized to access this resource.
                    details:
                      - field: authorization
                        message: Valid Bearer token required
                        code: unauthorized_access
                    status_code: 401
                    error_code: UNAUTHORIZED_ACCESS
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: Not Allowed
          content:
            application/json:
              schema: *ref_0
              examples:
                ErrorExample:
                  summary: ErrorExample
                  value:
                    error_message: Forbidden
                    details:
                      - field: authorization
                        message: Insufficient permissions to access this resource
                        code: forbidden
                    status_code: 403
                    error_code: FORBIDDEN
          headers: {}
          x-apidog-name: Forbidden
        '404':
          description: Wallet not found
          content:
            application/json:
              schema: *ref_0
              examples:
                NotFound:
                  summary: NotFound
                  value:
                    error_code: NOT_FOUND
                    error_message: Resource not found
                    details:
                      - field: resource
                        message: The requested resource was not found
                        code: not_found
                    status_code: 404
          headers: {}
          x-apidog-name: Not Found
      security:
        - bearerAuth3: []
          x-apidog:
            schemeGroups:
              - id: 5pNtxIwBFbQLe9ZNvRId0
                schemeIds:
                  - bearerAuth3
            required: true
            use:
              id: 5pNtxIwBFbQLe9ZNvRId0
            scopes:
              5pNtxIwBFbQLe9ZNvRId0:
                bearerAuth3: []
      x-apidog-folder: Vrtx Closed loop/Wallets
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1053095/apis/api-24814180-run
components:
  schemas:
    WalletBalanceResponse:
      type: object
      required:
        - wallet_id
        - balance
        - balance_minor
        - currency
      description: Wallet balance snapshot
      properties:
        wallet_id:
          $ref: '#/components/schemas/UUID'
          description: Wallet identifier
        balance:
          type: string
          examples:
            - '750.00'
          pattern: ^-?\d+(\.\d+)?$
          description: Available balance in major units
        balance_minor:
          type: integer
          format: int64
          examples:
            - 75000
          description: Available balance in minor units
        currency:
          type: string
          examples:
            - SAR
          description: ISO 4217 currency
      x-apidog-orders:
        - wallet_id
        - balance
        - balance_minor
        - currency
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    UUID:
      type: string
      format: uuid
      pattern: >-
        [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        error_code:
          type: string
        error_message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
        status_code:
          type: integer
          format: int32
      x-apidog-orders:
        - error_code
        - error_message
        - details
        - status_code
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string
      x-apidog-orders:
        - field
        - message
        - code
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth1:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
    bearerAuth2:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth3:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT issued by Keycloak. The client_id/azp in the token must map to a
        configured tenant (public, fai, neomrs; e.g., fai-sandbox -> fai) or
        requests will return 403.
    bearerAuth4:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.sandbox.vrtx.sa
    description: Sandbox
security:
  - bearer: []

```
