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

# List a customer's payment methods

> The payment methods saved on a customer through the API that can still be charged, newest first, in the key's environment. Detached ones are left out. Cards and bank accounts saved from the Payra dashboard or the customer portal have no payment method id and are not listed.



## OpenAPI

````yaml /api-reference/openapi-v1.json get /payment-methods
openapi: 3.1.0
info:
  title: Payra API
  version: v1
  description: >-
    The Payra API. Authenticate with a secret key: `Authorization: Bearer
    sk_test_...`. The two payment method session endpoints Payra Elements calls
    also take a publishable key with the session's `client_secret`.
servers:
  - url: https://api-dashboard.payra.com/v1
    description: 'Sandbox and live: the key decides which'
security: []
paths:
  /payment-methods:
    get:
      tags:
        - Payment methods
      summary: List a customer's payment methods
      description: >-
        The payment methods saved on a customer through the API that can still
        be charged, newest first, in the key's environment. Detached ones are
        left out. Cards and bank accounts saved from the Payra dashboard or the
        customer portal have no payment method id and are not listed.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            example: 019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c30
            description: The customer whose saved payment methods to list.
          required: true
          description: The customer whose saved payment methods to list.
          name: customer
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            example: 20
            description: How many to return, 1 to 100.
          required: false
          description: How many to return, 1 to 100.
          name: limit
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            example: pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf
            description: >-
              The `id` of the last payment method of the previous page; the page
              after it is returned.
          required: false
          description: >-
            The `id` of the last payment method of the previous page; the page
            after it is returned.
          name: starting_after
          in: query
      responses:
        '200':
          description: A page of payment methods
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethodList'
        '400':
          description: >-
            An unknown customer, `limit` out of range, or `starting_after` is
            not a payment method of that customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The API is not enabled for the workspace, or the key lacks the scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded; see Retry-After
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    PaymentMethodList:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMethod'
        has_more:
          type: boolean
      required:
        - object
        - data
        - has_more
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - idempotency_error
                - card_error
                - api_error
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
          required:
            - type
            - code
            - message
            - request_id
          additionalProperties:
            type: string
      required:
        - error
    PaymentMethod:
      type: object
      properties:
        object:
          type: string
          enum:
            - payment_method
        id:
          type: string
          example: pm_test_9kQ2mL7Hs1pXv4cR8tWzAbCdEf
        type:
          type: string
          enum:
            - card
            - us_bank_account
          example: card
        usage:
          type: string
          enum:
            - one_time
            - saved
          example: saved
          description: >-
            `saved` when the session named a customer: the instrument is vaulted
            and stays on their file. `one_time` otherwise: chargeable once,
            before `expires_at`.
        status:
          type: string
          enum:
            - active
            - consumed
            - expired
            - detached
          example: active
        customer:
          type:
            - string
            - 'null'
          format: uuid
          example: null
        session:
          type: string
          example: pms_test_7Hs2kQ9mL1pXv4cR8tWzAbCd
          description: The session the card was collected in.
        card:
          $ref: '#/components/schemas/PaymentMethodCard'
        us_bank_account:
          $ref: '#/components/schemas/PaymentMethodBankAccount'
        billing_details:
          $ref: '#/components/schemas/PaymentMethodBillingDetails'
        livemode:
          type: boolean
          example: false
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          example: null
          description: Set on a one-time method.
        created_at:
          type: string
          format: date-time
          example: '2026-09-18T14:00:00.000Z'
      required:
        - object
        - id
        - type
        - usage
        - status
        - customer
        - session
        - card
        - us_bank_account
        - billing_details
        - livemode
        - expires_at
        - created_at
    PaymentMethodCard:
      type:
        - object
        - 'null'
      properties:
        brand:
          type:
            - string
            - 'null'
          example: visa
        last4:
          type: string
          example: '4242'
        exp_month:
          type: integer
          example: 12
        exp_year:
          type: integer
          example: 2030
        funding:
          type:
            - string
            - 'null'
          enum:
            - credit
            - debit
          example: credit
          description: Known once the card is saved; null on a one-time method.
      required:
        - brand
        - last4
        - exp_month
        - exp_year
        - funding
      description: Set when `type` is `card`.
    PaymentMethodBankAccount:
      type:
        - object
        - 'null'
      properties:
        last4:
          type: string
          example: '6789'
        account_type:
          type: string
          enum:
            - checking
            - savings
          example: checking
        account_holder_type:
          type: string
          enum:
            - individual
            - company
          example: individual
      required:
        - last4
        - account_type
        - account_holder_type
      description: Set when `type` is `us_bank_account`.
      example: null
    PaymentMethodBillingDetails:
      type: object
      properties:
        name:
          type: string
          example: Ada Lovelace
          description: The name on the card or the account.
        postal_code:
          type:
            - string
            - 'null'
          example: '94110'
      required:
        - name
        - postal_code
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A secret key, `sk_test_...` or `sk_live_...`; a publishable key
        (`pk_...`) on the browser routes only

````