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

# Crear método de pago

> Crea un método de pago para registrar cobros y pagos.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/payment-methods
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/payment-methods:
    post:
      tags:
        - API
      summary: Crear método de pago
      description: Crea un método de pago para registrar cobros y pagos.
      operationId: createApiPaymentMethod
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiPaymentMethodMutationRequest'
      responses:
        '200':
          description: Método de pago creado exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiPaymentMethodCreateResponse'
        '400':
          description: Solicitud inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Solicitud inválida
                      retryable: false
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: API key faltante o inválida
                      retryable: false
                      details: []
        '403':
          description: Scopes insuficientes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Scopes insuficientes
                      retryable: false
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Error interno del servidor
                      retryable: false
                      details: []
components:
  schemas:
    ApiPaymentMethodMutationRequest:
      type: object
      properties:
        name:
          type: string
        type:
          $ref: '#/components/schemas/ApiSharedEnum377ec234cb'
        bank_account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        linked_account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        fee_percentage:
          anyOf:
            - type: string
            - type: 'null'
        fee_fixed:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
        requires_reference:
          type: boolean
        visibility:
          $ref: '#/components/schemas/ApiSharedEnum73bb779813'
        installment_plans:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              label:
                type: string
            required:
              - code
              - label
            additionalProperties: false
        is_active:
          type: boolean
      required:
        - name
      additionalProperties: false
    ApiPaymentMethodCreateResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          type: object
          properties:
            payment_method:
              $ref: '#/components/schemas/ApiSharedObjectbea6e6be70'
            idempotent_replay:
              type: boolean
          required:
            - payment_method
            - idempotent_replay
          additionalProperties: false
        warnings:
          type: array
          items: {}
      required:
        - request_id
        - data
        - warnings
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectc671832641'
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedEnum377ec234cb:
      type: string
      enum:
        - cash
        - check
        - card
        - bank_transfer
        - other
    ApiSharedEnum73bb779813:
      type: string
      enum:
        - sales
        - purchases
        - both
        - system
    ApiSharedObjectbea6e6be70:
      type: object
      properties:
        object:
          type: string
          const: payment_method
        id:
          type: string
          format: uuid
        name:
          type: string
        icon:
          anyOf:
            - type: string
            - type: 'null'
        type:
          $ref: '#/components/schemas/ApiSharedEnum377ec234cb'
        bank_account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        fee_percentage:
          anyOf:
            - type: string
            - type: 'null'
        fee_fixed:
          anyOf:
            - type: integer
            - type: 'null'
        requires_reference:
          type: boolean
        visibility:
          $ref: '#/components/schemas/ApiSharedEnum73bb779813'
        is_active:
          type: boolean
        is_default:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        installment_plans:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObjectfd1bf60b79'
      required:
        - object
        - id
        - name
        - icon
        - type
        - bank_account_id
        - fee_percentage
        - fee_fixed
        - requires_reference
        - visibility
        - is_active
        - is_default
        - created_at
        - updated_at
      additionalProperties: false
    ApiSharedObjectc671832641:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - code
        - message
      additionalProperties: false
    ApiSharedObjectfd1bf60b79:
      type: object
      properties:
        id:
          type: string
          format: uuid
        code:
          type: string
        label:
          type: string
        sort_order:
          type: integer
        is_active:
          type: boolean
      required:
        - id
        - code
        - label
        - sort_order
        - is_active
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````