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

# Create payment method

> Create a payment method for a customer



## OpenAPI

````yaml https://api.conduit.financial/api-docs/2024-12-01/openapi-external.yaml?mode=dynamic post /customers/{id}/payment-methods
openapi: 3.0.2
info:
  version: '2024-12-01'
  title: Conduit API
  description: The Conduit Financial API
  contact:
    name: Conduit Support
    email: conduit@conduit.fi
servers:
  - url: https://api.conduit.financial
    description: The Conduit API live environment
  - url: https://api.sandbox.conduit.financial
    description: The Conduit API Sandbox environment
security: []
tags:
  - name: Accounts
    description: |
      Endpoints dealing with accounts.
  - name: Counterparties
    description: |
      Endpoints dealing with counterparties information. 
  - name: Quotes
    description: |
      Endpoints dealing with quotes.
  - name: Transactions
    description: |
      Endpoints dealing with transactions.
  - name: Documents
    description: |
      Endpoints dealing with documents.
  - name: Customers
    description: |
      Endpoints dealing with customer information. 
paths:
  /customers/{id}/payment-methods:
    post:
      tags:
        - Customers
      summary: Create payment method
      description: Create a payment method for a customer
      operationId: createPaymentMethod
      parameters:
        - schema:
            $ref: '#/components/schemas/CustomerId'
          required: true
          description: A valid Customer ID
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateBankPaymentMethod'
                - $ref: '#/components/schemas/CryptoPaymentMethod'
              discriminator:
                propertyName: type
                mapping:
                  bank:
                    $ref: '#/components/schemas/CreateBankPaymentMethod'
                  wallet:
                    $ref: '#/components/schemas/CryptoPaymentMethod'
      responses:
        '201':
          description: Payment method created successfully
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/BankPaymentMethodResponse'
                  - type: object
                    properties:
                      id:
                        $ref: '#/components/schemas/WalletId'
                      type:
                        type: string
                        enum:
                          - wallet
                      rail:
                        type: string
                        enum:
                          - ethereum
                          - tron
                          - base
                          - polygon
                          - solana
                          - xrpl
                      walletAddress:
                        type: string
                      walletLabel:
                        type: string
                      status:
                        $ref: '#/components/schemas/PaymentMethodStatus'
                      entity:
                        type: object
                        properties:
                          id:
                            anyOf:
                              - $ref: '#/components/schemas/CounterpartyId'
                              - $ref: '#/components/schemas/CustomerId'
                              - $ref: '#/components/schemas/AccountHolderId'
                          name:
                            type: string
                          entityType:
                            type: string
                            enum:
                              - individual
                              - business
                          complianceEntityType:
                            type: string
                            enum:
                              - customer
                              - counterparty
                              - client
                              - account_holder
                        required:
                          - id
                          - name
                          - entityType
                          - complianceEntityType
                    required:
                      - id
                      - type
                      - rail
                      - walletAddress
                      - walletLabel
        '400':
          description: Input validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '403':
          description: Authorization error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '415':
          description: Unsupported media type error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeErrorResponse'
        '429':
          description: Throttling error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
        '500':
          description: Internal Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - apiKey: []
          apiSecret: []
components:
  schemas:
    CustomerId:
      type: string
      pattern: ^cus_[a-zA-Z0-9]{27}$
      description: A valid Customer ID
      example: cus_2ofTA13AD0xBtbEvBl20aEb1hEu
    CreateBankPaymentMethod:
      type: object
      properties:
        type:
          type: string
          enum:
            - bank
        rail:
          type: array
          items:
            type: string
            enum:
              - ach_colombia
              - ach
              - pix
              - swift
              - fedwire
              - ted
              - spei
              - sepa
              - pse
              - rtgs
              - ars_bank_transfer
              - fps
              - chaps
              - fast
              - international_wire
              - bank_transfer
          maxItems: 1
        bankName:
          type: string
        accountOwnerName:
          type: string
          description: >-
            DEPRECATED: This field is ignored for counterparties. The
            counterparty name is automatically used instead.
          deprecated: true
        accountType:
          type: string
          enum:
            - savings
            - checking
            - electronic_deposit
        accountNumber:
          type: string
        iban:
          type: string
        pixKey:
          type: string
        routingNumber:
          type: string
        swiftCode:
          type: string
        branchCode:
          type: string
        bankCode:
          type: string
        sortCode:
          type: string
        currency:
          type: string
          enum:
            - USD
            - MXN
            - BRL
            - COP
            - EUR
            - NGN
            - ARS
            - GBP
            - AED
            - SGD
            - HKD
          description: The asset identifier. A fiat currency code.
        address:
          type: object
          properties:
            streetLine1:
              type: string
            streetLine2:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
            country:
              type: string
              description: ISO 3166-1 alpha-3 country code
              example: USA
          required:
            - country
      required:
        - type
        - rail
        - bankName
        - currency
        - address
      additionalProperties: false
      example:
        type: bank
        rail:
          - fedwire
        bankName: Bank of America
        accountOwnerName: John Doe
        accountNumber: '1234567890'
        currency: USD
        routingNumber: '1234567890'
        address:
          streetLine1: 123 Main St
          city: New York
          state: NY
          postalCode: '10001'
          country: USA
    CryptoPaymentMethod:
      type: object
      properties:
        type:
          type: string
          enum:
            - wallet
        rail:
          $ref: '#/components/schemas/NetworkName'
        walletAddress:
          type: string
        walletLabel:
          type: string
      required:
        - type
        - rail
        - walletAddress
        - walletLabel
      additionalProperties: false
      example:
        type: wallet
        rail: ethereum
        walletAddress: 0X0000000
        walletLabel: Personal ETH Wallet
    BankPaymentMethodResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/BankAccountId'
        type:
          type: string
          enum:
            - bank
        bankName:
          type: string
        accountNumber:
          type: string
        iban:
          type: string
        pixKey:
          type: string
        routingNumber:
          type: string
        swiftCode:
          type: string
        branchCode:
          type: string
        bankCode:
          type: string
        sortCode:
          type: string
        currency:
          type: string
          enum:
            - USD
            - MXN
            - BRL
            - COP
            - EUR
            - NGN
            - ARS
            - GBP
            - AED
            - SGD
            - HKD
          description: The asset identifier. A fiat currency code.
        accountType:
          type: string
          enum:
            - savings
            - checking
            - electronic_deposit
        accountOwnerName:
          type: string
        address:
          type: object
          properties:
            streetLine1:
              type: string
            streetLine2:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
            country:
              type: string
        status:
          $ref: '#/components/schemas/PaymentMethodStatus'
        rail:
          type: array
          items:
            $ref: '#/components/schemas/FiatPaymentRail'
        entity:
          type: object
          properties:
            id:
              anyOf:
                - $ref: '#/components/schemas/CounterpartyId'
                - $ref: '#/components/schemas/CustomerId'
                - $ref: '#/components/schemas/AccountHolderId'
            name:
              type: string
            entityType:
              type: string
              enum:
                - individual
                - business
            complianceEntityType:
              type: string
              enum:
                - customer
                - counterparty
                - client
                - account_holder
          required:
            - id
            - name
            - entityType
            - complianceEntityType
      required:
        - id
        - type
        - bankName
        - currency
        - accountOwnerName
        - status
      title: Bank Payment Method Response
      example:
        id: bank_1234
        type: bank
        rail:
          - fedwire
        bankName: Bank of America
        accountOwnerName: John Doe
        accountNumber: '1234567890'
        currency: USD
        routingNumber: '1234567890'
        status: enabled
        address:
          streetLine1: 123 Main St
          city: New York
          state: NY
          postalCode: '10001'
          country: USA
        entity:
          id: cp_1234567890123456789012345
          name: Mark Davis
          entityType: individual
          complianceEntityType: counterparty
    WalletId:
      type: string
      pattern: ^wlt_[a-zA-Z0-9]{27}$
      description: A valid Wallet ID
      example: wlt_2ofTAESrTs4uQ8N3yGBMhGj59jV
    PaymentMethodStatus:
      type: string
      enum:
        - enabled
        - disabled
    CounterpartyId:
      type: string
      pattern: ^cp_[a-zA-Z0-9]{27}$
      description: A valid Counterparty ID
      example: cp_2ofTA13AD0xBtbEvBl20aEb1hEu
    AccountHolderId:
      type: string
      pattern: ^ahl_[a-zA-Z0-9]{27}$
      description: A valid Account Holder ID
      example: ahl_2ofTA9KYmWBoRaFyAkBNBIZcfG4
    BadRequestErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    ForbiddenErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    UnsupportedMediaTypeErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    TooManyRequestsErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    InternalServerErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              code:
                type: string
            required:
              - detail
              - code
      required:
        - errors
    NetworkName:
      type: string
      enum:
        - ethereum
        - tron
        - solana
        - polygon
        - base
        - xrpl
      description: >-
        The stablecoin asset network identifier. Required for stablecoins;
        omitted for fiat.
    BankAccountId:
      type: string
      pattern: ^bank_[a-zA-Z0-9]{27}$
      description: A valid Bank Account ID
      example: bank_2ofTA5mz0T91pBmD3tMTeLE7T4X
    FiatPaymentRail:
      type: string
      enum:
        - ach_colombia
        - ach
        - fedwire
        - pix
        - ted
        - sepa
        - spei
        - swift
        - rtgs
        - pse
        - ars_bank_transfer
        - fps
        - chaps
        - fast
        - international_wire
        - bank_transfer
  securitySchemes:
    apiKey:
      type: apiKey
      description: Includes an API key in the HTTP headers to authenticate the client.
      name: X-API-Key
      in: header
    apiSecret:
      type: apiKey
      description: Includes an API secret in the HTTP headers to authenticate the client.
      name: X-API-Secret
      in: header

````