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
- 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
- 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
Payment Method Statuses
| Status | Description |
|---|---|
PENDING | Payment method created, waiting for the customer to complete the checkout and save their card. |
ACTIVE | Card has been verified and saved. You can charge this payment method. |
EXPIRED | The checkout link expired before the customer completed the card-saving process. |
REVOKED | The payment method has been permanently revoked and can no longer be charged. |
Payment Statuses
When you charge a saved payment method, each payment has its own status:| Status | Description |
|---|---|
NOT_INITIALIZED | Payment has been created but processing has not started. |
PENDING | Payment is being processed. |
CONFIRMED | Payment has been successfully completed. |
CANCELLED | Payment was cancelled during processing. |
REFUNDED | Payment has been fully refunded. |
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.