# Get default payment method

Source: https://docs.recoupable.dev/api-reference/accounts/payment-method-get

Retrieve the default payment method on file for an account. An account may be tagged on more than one Stripe customer (for example an organization whose card…

## GET /api/accounts/{id}/payment-method

Full OpenAPI specification: https://docs.recoupable.dev/spec/accounts.json

## Authentication

This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification.

[Authentication guide](https://docs.recoupable.dev/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Recoup API - Accounts",
    "description": "API documentation for the Recoup platform - an AI agent platform for the music industry",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.recoupable.dev"
    }
  ],
  "paths": {
    "/api/accounts/{id}/payment-method": {
      "get": {
        "operationId": "getAccountsByIdPaymentMethod",
        "description": "Retrieve the default payment method on file for an account. An account may be tagged on more than one Stripe customer (for example an organization whose card was saved on one customer and whose invoiced plan lives on another); the card is read from the tagged customer that holds a default payment method. Returns `card: null` when the selected customer has no supported default card, including when no tagged customer exists — the top-up dialog uses this to decide whether to show a pre-charge confirmation (card present) or route to a checkout session to collect one (`card: null`). Cards are returned even when expired; callers should compare `exp_month` / `exp_year` against the current date and warn the customer, since an off-session charge against an expired card will decline. Removing the selected card does not remove other saved cards: a later read can select a different remaining card. Auto top-up stays off after successful removal until explicitly re-enabled.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (UUID) of the account. Must be the authenticated account or another accessible via organization membership.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default payment method retrieved successfully (may be `null` if none on file).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPaymentMethodResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPaymentMethodErrorResponse"
                },
                "example": {
                  "error": "Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - the account is not the caller's and not an organization they belong to (an unknown id also returns 403, never 404)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPaymentMethodErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountPaymentMethodResponse": {
        "type": "object",
        "required": [
          "account_id",
          "card"
        ],
        "properties": {
          "account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the account this payment method belongs to.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "card": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SavedCard"
              },
              {
                "type": "null"
              }
            ],
            "description": "Default card resolved by this lookup. `null` when the selected Stripe customer has no supported default card, including when no tagged customer exists. This describes the current lookup result; it does not establish whether the account previously saved a card or whether other cards remain attached."
          }
        }
      },
      "AccountPaymentMethodErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable error message.",
            "example": "Unauthorized"
          }
        }
      },
      "SavedCard": {
        "type": "object",
        "required": [
          "brand",
          "last4",
          "exp_month",
          "exp_year",
          "funding"
        ],
        "properties": {
          "brand": {
            "type": "string",
            "description": "Card brand. Common values: `visa`, `mastercard`, `amex`, `discover`, `diners`, `jcb`, `unionpay`, `unknown`.",
            "example": "visa"
          },
          "last4": {
            "type": "string",
            "pattern": "^\\d{4}$",
            "description": "Last four digits of the card number. Safe to display in UI for identification.",
            "example": "4242"
          },
          "exp_month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Card expiration month (1-12). Compare against the current month to detect expired cards.",
            "example": 12
          },
          "exp_year": {
            "type": "integer",
            "description": "Card expiration year (full 4-digit year). Compare against the current year to detect expired cards.",
            "example": 2026
          },
          "funding": {
            "type": "string",
            "description": "Funding type. Common values: `credit`, `debit`, `prepaid`, `unknown`.",
            "example": "credit"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your Recoup API key. [Learn more](/quickstart#api-keys)."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```
