Skip to main content
A payment method allows you to securely save a customer’s credit or debit card and charge it on demand, without the customer needing to re-enter their card details each time. This is ideal for recurring billing, subscriptions, memberships, and any scenario where you need to charge a customer repeatedly.

What You Can Do

With payment methods, you can:
  • Save Cards Securely: Customers complete a one-time checkout to save their card through Compago’s PCI-compliant infrastructure
  • Charge on Demand: Initiate charges against saved cards at any time via API
  • Process Refunds: Issue full refunds for charges made against saved cards
  • Manage Cards: List, retrieve, and revoke saved payment methods
  • Track Payments: View the full payment history for each saved card
  • Customize Checkout: Choose between a full-page redirect or embedded iframe for the card-saving flow

Use Cases

Payment methods are perfect for:
  • Subscriptions: Charge customers monthly or annually for SaaS products, streaming services, or memberships
  • Memberships: Automatically bill members for gym access, clubs, or professional organizations
  • On-demand Services: Charge customers after service delivery (ride-sharing, food delivery, freelance work)
  • Pay-later Flows: Collect card details upfront and charge later when an order ships or a service is rendered
  • Installment Billing: Split large payments into multiple charges over time

How It Works

  1. Create: Your backend calls the Compago API to create a payment method, providing customer billing details and optional customization
  2. Checkout: The customer is directed to the checkout URL to securely enter their card details
  3. Verification: Compago places a small verification charge (default $1 MXN) which is then voided to validate the card
  4. Card Saved: Once verified, the payment method status changes to ACTIVE and the card is securely stored
  5. Charge on Demand: You can now charge the saved card at any time by calling the charge endpoint

Payment Method Statuses

Payment Statuses

When you charge a saved payment method, each payment has its own status:

Prerequisites

Before using payment methods, ensure you have:
  • An active Compago account with API access
  • A valid API key (generate one at Configuraciones → Desarrollador in your Compago Dashboard)
  • Your integration configured to use MXN currency
Payment methods currently support MXN (Mexican Peso) only. Transactions in other currencies will be rejected.

Next Steps

Save a Card

Learn how to create a payment method and guide your customer through the card-saving checkout.

Charge a Saved Card

Charge a customer’s saved card on demand via API.

Manage Payment Methods

List, retrieve, and revoke saved payment methods and their payments.

Process Refunds

Issue full refunds for charges made against saved cards.