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

# Charge Method



## OpenAPI

````yaml POST /payment-method/{id}/payment
openapi: 3.1.0
info:
  title: Compago API
  version: 1.0.0
  description: >-
    Public and private API endpoints for Compago's payment infrastructure. This
    specification currently includes endpoints for one-time payments. More
    endpoints will be added as the platform evolves.
servers:
  - url: https://demo.api.harmony.compago.com/api
  - url: https://api.harmony.compago.com/api
security: []
tags:
  - name: OneTimePayment
    description: Endpoints for creating and processing one-time payment links
  - name: PaymentMethod
    description: >-
      Endpoints for saving cards, charging saved payment methods, and processing
      refunds
  - name: PaymentIntent
    description: >-
      Endpoints for creating and managing card-present payment intents for POS
      terminal integrations
paths:
  /payment-method/{id}/payment:
    post:
      tags:
        - PaymentMethod
      summary: Charge a saved payment method
      operationId: chargePaymentMethod
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique identifier of the payment method to charge
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChargePaymentMethodRequest'
      responses:
        '200':
          description: Payment created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargePaymentMethodResponse'
        '400':
          description: Invalid request or payment method not ACTIVE
        '401':
          description: Unauthorized – missing or invalid API key
        '404':
          description: Payment method not found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ChargePaymentMethodRequest:
      type: object
      description: Request body for charging a saved payment method
      properties:
        amount:
          type: number
          format: decimal
          minimum: 0.01
          example: 500
          description: The amount to charge in MXN. Must be a positive number.
        currency:
          type: string
          enum:
            - MXN
          default: MXN
          example: MXN
          description: Currency code. Defaults to MXN.
        description:
          type: string
          example: Monthly subscription - January 2025
          description: A description of the charge.
      required:
        - amount
    ChargePaymentMethodResponse:
      type: object
      description: Response after charging a payment method
      properties:
        id:
          type: string
          format: uuid
          example: 11111111-2222-3333-4444-555555555555
          description: Unique identifier of the payment
        status:
          type: string
          enum:
            - NOT_INITIALIZED
            - PENDING
            - CONFIRMED
            - CANCELLED
            - REFUNDED
          example: CONFIRMED
          description: Current status of the payment
        amount:
          type: number
          format: decimal
        currency:
          type: string
          example: MXN
      required:
        - id
        - status
        - amount
        - currency
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````