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

# List payment methods

> List all saved payment methods for the authenticated wallet. Returns card details and default status. Requires a merchant secret key (aks_live_* / aks_test_*).



## OpenAPI

````yaml /openapi.json get /payment_methods
openapi: 3.0.0
info:
  title: Lava API
  description: >-
    Lava API enables businesses to implement usage-based billing for AI
    services. This API allows tracking, managing, and billing for third-party AI
    API usage through a forwarding system.
  version: 1.0.0
  contact:
    name: Lava support
    url: https://www.lava.so/contact
servers:
  - url: https://api.lava.so/v1/
    description: Lava API v1
security: []
tags:
  - name: Authentication
  - name: Core Endpoints
  - name: Models
  - name: Services
  - name: Requests
  - name: Wallet
  - name: Payment Methods
  - name: Spend Keys
  - name: Usage
  - name: Checkout Sessions
  - name: Customers
  - name: Plans
  - name: Subscriptions
  - name: Meters
  - name: Webhooks
  - name: Secret Keys
  - name: Credit Bundles
  - name: Gateway Settings
  - name: Skills
  - name: News Data
  - name: Search
  - name: Enrich
paths:
  /payment_methods:
    get:
      tags:
        - Payment Methods
      summary: List payment methods
      description: >-
        List all saved payment methods for the authenticated wallet. Returns
        card details and default status. Requires a merchant secret key
        (aks_live_* / aks_test_*).
      responses:
        '200':
          description: Payment methods list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        payment_method_id:
                          type: string
                          description: Unique identifier for the payment method
                        last4:
                          type: string
                          description: Last four digits of the card number
                          example: '4242'
                        expiry_month:
                          type: string
                          description: Card expiration month
                          example: '12'
                        expiry_year:
                          type: string
                          description: Card expiration year
                          example: '2027'
                        brand:
                          type: string
                          description: Card brand (e.g., visa, mastercard)
                          example: visa
                        is_default:
                          type: boolean
                          description: Whether this is the default payment method
                        has_error:
                          type: boolean
                          description: Whether the payment method has a recent error
                        error_code:
                          type: string
                          nullable: true
                          description: Error code if the card has failed recently
                        error_message:
                          type: string
                          nullable: true
                          description: Error message if the card has failed recently
                        error_at:
                          type: string
                          nullable: true
                          description: ISO 8601 timestamp of the most recent error
        '404':
          description: Wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                wallet_not_found:
                  summary: Account has no wallet
                  value:
                    error:
                      message: >-
                        The authenticated account does not have a wallet
                        available for this operation.
                      code: auth_account_wallet_not_found
                      status: 404
      security:
        - Auth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable error message describing what went wrong
              example: Invalid authentication credentials
            code:
              type: string
              description: Machine-readable error code describing what went wrong
              example: forward_token_json_invalid
            status:
              type: integer
              description: HTTP status code of the error
              example: 400
            issues:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: array
                    items:
                      type: string
                    description: Path to the field that caused the validation error
                  message:
                    type: string
                    description: Error message describing the validation issue
                required:
                  - path
                  - message
              description: >-
                Optional array of specific validation issues with their paths
                and messages
              example:
                - path:
                    - model
                  message: 'Missing required field: model'
                - path:
                    - messages
                    - '0'
                    - content
                  message: Invalid message content format
          required:
            - message
            - code
            - status
      required:
        - error
  securitySchemes:
    Auth:
      type: http
      scheme: bearer
      description: >-
        Bearer token authentication used for standard API calls. Format: 'Bearer
        YOUR_API_KEY'

````