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

# Update Team Payment Method

> Set the team's default payment method after SetupIntent confirm (Admin only).



## OpenAPI

````yaml /openapi.json patch /api/v1/teams/{team_id}/billing/payment-method
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/teams/{team_id}/billing/payment-method:
    patch:
      tags:
        - Teams
      summary: Update Team Payment Method
      description: >-
        Set the team's default payment method after SetupIntent confirm (Admin
        only).
      operationId: >-
        update_team_payment_method_api_v1_teams__team_id__billing_payment_method_patch
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentMethodUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamBillingResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PaymentMethodUpdateRequest:
      properties:
        payment_method_id:
          type: string
          maxLength: 255
          minLength: 3
          title: Payment Method Id
          description: Stripe PaymentMethod id (pm_…) confirmed via a SetupIntent
      type: object
      required:
        - payment_method_id
      title: PaymentMethodUpdateRequest
    TeamBillingResponse:
      properties:
        customer_on_file:
          type: boolean
          title: Customer On File
        has_payment_method:
          type: boolean
          title: Has Payment Method
        brand:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand
        last4:
          anyOf:
            - type: string
            - type: 'null'
          title: Last4
        exp_month:
          anyOf:
            - type: integer
            - type: 'null'
          title: Exp Month
        exp_year:
          anyOf:
            - type: integer
            - type: 'null'
          title: Exp Year
      type: object
      required:
        - customer_on_file
        - has_payment_method
      title: TeamBillingResponse
      description: Member-readable card-on-file summary (non-sensitive mirror fields).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````