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

# Set default payment method

> Choose a saved method for the signed-in account using its quoted If-Match revision. Replaces the default only within the same provider, merchant account, and payment type. Does not authorize or dispatch a purchase.

Choose a saved payment method for your signed-in account with a user-authorized `human:actions` OAuth grant. List methods first, then send the method ID and its quoted revision in `If-Match`. A stale revision returns `409`; refresh before retrying.

The default changes only within the same provider, merchant account, and payment type. Selecting a default does not approve, dispatch, or settle a purchase. This operation remains release-gated until account ownership migration and live provider verification are complete.


## OpenAPI

````yaml openapi-target-accounts.json POST /v2/account/payment-methods/{methodId}/default
openapi: 3.1.0
info:
  title: Darwin target accounts
  version: 1.0.0
  description: >-
    Manage saved payment methods and authentication credentials for your Darwin
    account. Older AI-scoped routes remain as compatibility aliases.
servers:
  - url: https://api.darwin.so/api
    description: Darwin API after cutover
security: []
paths:
  /v2/account/payment-methods/{methodId}/default:
    post:
      tags:
        - Account
      summary: Set default payment method
      description: >-
        Choose a saved method for the signed-in account using its quoted
        If-Match revision. Replaces the default only within the same provider,
        merchant account, and payment type. Does not authorize or dispatch a
        purchase.
      operationId: set_default_account_payment_method
      parameters:
        - name: methodId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
        - name: If-Match
          in: header
          required: true
          schema:
            type: string
            pattern: ^"(0|[1-9][0-9]*)"$
      responses:
        '200':
          description: Authorized account metadata only.
          content:
            application/json:
              schema:
                type: object
                properties:
                  paymentMethodId:
                    type: string
                    minLength: 1
                    maxLength: 200
                    pattern: ^[A-Za-z0-9_-]+$
                  label:
                    type: string
                    minLength: 1
                    maxLength: 100
                  method:
                    type: string
                    enum:
                      - card
                      - bank
                      - hosted_checkout
                      - darwin_wallet
                      - mpp
                      - x402
                      - ucp
                      - acp
                  status:
                    type: string
                    enum:
                      - active
                      - revoked
                      - expired
                  isDefault:
                    type: boolean
                  revision:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  expiresAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                required:
                  - paymentMethodId
                  - label
                  - method
                  - status
                  - isDefault
                  - revision
                  - expiresAt
                additionalProperties: false
          headers:
            Cache-Control:
              schema:
                type: string
                const: no-store
        '400':
          description: Invalid or unsupported input.
        '401':
          description: Authentication required.
        '403':
          description: >-
            Missing scope, owner/admin role, or AI grant. Writes require a user
            API key.
        '404':
          description: AI or account is not available to this principal.
        '409':
          description: >-
            Method changed or is unavailable. Refresh before selecting a
            default.
        '429':
          description: >-
            Read allowance exceeded. Wait before retrying; changing the AI or
            MCP tool does not reset the budget.
          headers:
            Retry-After:
              description: Minimum seconds before retrying.
              schema:
                type: integer
                minimum: 1
        '503':
          description: >-
            Account thread integration or required credential custody is
            unavailable.
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.