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

# List the payment methods for an invoice

> Retrieves the saved payment methods of the company billed for this invoice, each answered for the invoice itself. A method the invoice cannot be paid with is returned with a `restricted` object naming the reason, rather than omitted, so a payer can be told why their stored card is unavailable. `restricted` is null on a method that can pay.



## OpenAPI

````yaml https://api.salesbricks.com/api/v2/openapi.yaml get /invoices/{invoice_id}/payment-methods
openapi: 3.0.3
info:
  title: Salesbricks REST API
  version: 2.0.0
  description: API reference for external integrations
servers:
  - url: https://api.salesbricks.com/api/v2
    description: Production
  - url: https://api.staging.salesbricks.com/api/v2
    description: Staging
security:
  - ApiKeyAuth: []
tags:
  - name: Subscriptions
    description: >-
      Operations related to subscription management, including creation,
      updates, and retrieving subscription details. Subscriptions can be
      upgraded to add / remove add-ons by using the POST
      /subscriptions/{subscription_id}/upgrade endpoint and can be recasted for
      replacing the current agreement using the POST
      /subscriptions/{subscription_id}/recast endpoint
  - name: Subscription Milestones
    description: >-
      Operations for listing and completing milestone bricks — bricks billed
      when the work they cover is delivered rather than on the subscription's
      schedule. Completing one either raises a standalone invoice immediately or
      bills on the subscription's next scheduled invoice.
  - name: Customers
    description: >-
      Operations related to customer management, including creation, updates,
      and managing customer person objects.
  - name: Invoices
    description: Operations related to subscription's invoicing details.
  - name: Plans
    description: >-
      Operations related to listing and getting plan details including bricks in
      the plan.
  - name: Payment Methods
    description: Operations related to subscription's payment method.
paths:
  /invoices/{invoice_id}/payment-methods:
    get:
      tags:
        - Payment Methods
      summary: List the payment methods for an invoice
      description: >-
        Retrieves the saved payment methods of the company billed for this
        invoice, each answered for the invoice itself. A method the invoice
        cannot be paid with is returned with a `restricted` object naming the
        reason, rather than omitted, so a payer can be told why their stored
        card is unavailable. `restricted` is null on a method that can pay.
      operationId: listInvoicePaymentMethods
      parameters:
        - in: path
          name: invoice_id
          schema:
            type: string
            pattern: ^([a-zA-Z\d\-]+)$
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PaymentMethod'
          description: ''
components:
  schemas:
    PaymentMethod:
      type: object
      description: |-
        Serializer for payment method data returned by the payment methods API.
        Handles card, bank account, SEPA direct debit, and Link payment methods.
      properties:
        payment_method_id:
          type: string
          description: Unique Stripe payment method identifier
        is_default:
          type: boolean
          description: Whether this is the default payment method for the customer
        type:
          enum:
            - card
            - us_bank_account
            - link
          type: string
          x-spec-enum-id: e0c8e246e770313d
          description: |-
            Type of payment method

            * `card` - Card
            * `us_bank_account` - US Bank Account
            * `link` - Link
        us_bank_account:
          $ref: '#/components/schemas/BankAccount'
        card:
          $ref: '#/components/schemas/Card'
        link:
          $ref: '#/components/schemas/Link'
        restricted:
          allOf:
            - $ref: '#/components/schemas/MethodRefusal'
          nullable: true
      required:
        - is_default
        - payment_method_id
        - type
    BankAccount:
      type: object
      properties:
        bank_name:
          type: string
          nullable: true
          description: Name of the bank - only present for bank account payment methods
        bank_type:
          type: string
          nullable: true
          description: >-
            Type of bank account (checking/savings) - only present for bank
            account payment methods
        last4:
          type: string
          nullable: true
          description: >-
            Last 4 digits of the bank account - only present for bank account
            payment methods
        routing_number:
          type: string
          nullable: true
          description: Bank routing number - only present for bank account payment methods
    Card:
      type: object
      properties:
        brand:
          type: string
          nullable: true
          description: >-
            Card brand (e.g., visa, mastercard) - only present for card payment
            methods
        last4:
          type: string
          nullable: true
          description: Last 4 digits of the card - only present for card payment methods
        exp_month:
          type: integer
        exp_year:
          type: integer
    Link:
      type: object
      properties:
        email:
          type: string
          nullable: true
          description: Email associated with Link - only present for Link payment methods
    MethodRefusal:
      type: object
      description: Why this invoice will not accept the method it is attached to.
      properties:
        reason:
          type: string
          description: >-
            Machine-readable cause, so a client can style the refusal without
            parsing its wording. `credit_card_limit` or `force_credit_card`.
        message:
          type: string
          description: The refusal as it should be shown to the payer.
      required:
        - message
        - reason
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-SALESBRICKS-KEY
      description: API key for authentication

````

## Related topics

- [List all payment methods](/api-reference/payment-methods/list-all-payment-methods.md)
- [List all subscription invoices](/api-reference/invoices/list-all-subscription-invoices.md)
- [List all customer invoices](/api-reference/invoices/list-all-customer-invoices.md)
