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
- Create: Your backend calls the Compago API to create a payment method, providing customer billing details and optional customization
- Checkout: The customer is directed to the checkout URL to securely enter their card details
- Verification: Compago places a small verification charge (default $1 MXN) which is then voided to validate the card. Send
collectFundson the create call to charge or hold a real amount at this step instead - Card Saved: Once verified, the payment method status changes to
ACTIVEand the card is securely stored - Charge on Demand: You can now charge the saved card at any time by calling the charge endpoint
- Or Hold First: Send
holdFunds: trueon 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.comfor Demo,app.compago.comfor 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.