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
  • Hold Funds: Reserve money on a card for up to 7 natural days, then capture it (in full or in part) or release it back to the customer
  • Collect on the Card-Saving Link: With collectFunds, the same link that saves the card can also charge or hold an amount, instead of saving the card and charging it in a second step. See Save a Card
  • 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
  • Deposits and Bookings: Hold a security deposit or a reservation amount, then capture it at checkout or release it when the customer owes nothing

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. Send collectFunds on the create call to charge or hold a real amount at this step instead
  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
  6. Or Hold First: Send holdFunds: true on the same endpoint to reserve the funds instead of charging them, then capture the hold (in full or in part) or release it within 7 natural days

Payment Method Statuses

Payment Statuses

When you charge a saved payment method, each payment has its own status:
HELD, HOLD_RELEASED, and HOLD_EXPIRED only appear on payments created with holdFunds: true, or through a card-saving link created with collectFunds: "HOLD". See Hold Funds for the full lifecycle. A captured hold becomes CONFIRMED, just like a regular charge. When only part of the hold was captured, amount is the captured amount and heldAmount keeps the amount that was originally held.

Prerequisites

Before using payment methods, ensure you have:
  • An active Compago account with API access
  • A valid API key, created at Configuraciones → Desarrollador in the dashboard of the environment you call (demo-app.compago.com for Demo, app.compago.com for Production). See Environments.
  • 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.

Hold Funds

Hold funds on a saved card, then capture them (in full or in part) or release them within 7 natural days.

Manage Payment Methods

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

Process Refunds

Issue full refunds for charges made against saved cards.