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

# Create payment method

> Registers a payment method for a customer. The method is created in the ACTIVE state and can back new payments right away.



## OpenAPI

````yaml POST /payment-methods
openapi: 3.1.0
info:
  title: Wave Lines API
  version: 1.0.0
servers: []
security:
  - client_id: []
    secret_key: []
tags:
  - name: lines
    description: Line lifecycle operations
  - name: payments
    description: Payment listing and lookup
  - name: payment-methods
    description: Payment method lifecycle operations
  - name: tax-receipts
    description: Tax receipt listing, lookup and document download
  - name: subscriptions
    description: Subscription lookup, product management and invoices
  - name: holders
    description: Holder (customer) listing, lookup and creation
  - name: usage
    description: 'Usage: per-product line balance and consumption'
  - name: Portability
    description: >-
      Number portability: port-in request creation, listing, modification and
      cancellation, plus the consolidated portability status
  - name: Inventory
    description: >-
      Inventory resource pools: pool listing, the resources held in a pool and
      resource reservations
  - name: Catalog
    description: Catalog offers exposed by the Wave Catalog API
paths:
  /payment-methods:
    post:
      tags:
        - payment-methods
      summary: Create payment method
      description: >-
        Registers a payment method for a customer. The method is created in the
        ACTIVE state and can back new payments right away.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                providerId:
                  type: string
                  format: uuid
                  description: Provider that operates the payment method.
                customerId:
                  type: string
                  format: uuid
                  description: Customer the payment method belongs to.
                type:
                  type: string
                  enum:
                    - CREDIT_CARD
                    - PIC_PAY
                  description: The kind of payment method.
                config:
                  type: object
                  additionalProperties:
                    type:
                      - string
                      - number
                      - 'null'
                  default: {}
                  description: >-
                    Provider-specific configuration for the payment method, such
                    as tokens, card brand or wallet identifiers. Defaults to an
                    empty object.
              required:
                - providerId
                - customerId
                - type
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique payment method identifier.
                  providerId:
                    type: string
                    format: uuid
                    description: Provider that operates the payment method.
                  customerId:
                    type: string
                    format: uuid
                    description: Customer the payment method belongs to.
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - DELETED
                    description: >-
                      Current lifecycle state. A DELETED method cannot back new
                      payments.
                  type:
                    type: string
                    enum:
                      - CREDIT_CARD
                      - PIC_PAY
                    description: The kind of payment method.
                  config:
                    type: object
                    additionalProperties:
                      type:
                        - string
                        - number
                        - 'null'
                    description: Provider-specific configuration for the payment method.
                  createdAt:
                    type: string
                    format: date-time
                    description: When the payment method was created.
                  updatedAt:
                    type: string
                    format: date-time
                    description: When the payment method was last updated.
                required:
                  - id
                  - providerId
                  - customerId
                  - status
                  - type
                  - config
                  - createdAt
                  - updatedAt
                additionalProperties: false
components:
  securitySchemes:
    client_id:
      type: apiKey
      in: header
      name: client_id
    secret_key:
      type: apiKey
      in: header
      name: secret_key

````