Insights
Payment gateway integration in LATAM: Mercado Pago, Stripe, PSE, and Wompi with custom software
July 27, 2026 · 11 min read
In Mexico and Colombia, accepting online payments is no longer optional. E-commerce, subscription SaaS, marketplaces, B2B portals, and mobile apps all need to charge reliably — with cards, bank transfers, wallets, and local methods. The easy part is showing a pay button. The hard part is everything after: confirming the payment without failures, avoiding duplicate charges, reconciling against your system, handling refunds, and invoicing under local law.
This guide is for business owners, CTOs, and product leaders who want to integrate a payment gateway with commercial intent. It is not about building a fintech from scratch (we cover that in the fintech software guide): it is about connecting Mercado Pago, Stripe, Conekta, PSE, Wompi, or another gateway to a product or business that already sells. It is the approach we use at DIPA when we embed payments inside custom software.
Why integrate payments into your software (not just paste a link)
- Reliable confirmation: the order is marked “paid” only when the gateway confirms via webhook, not when the user “thinks” they paid.
- One source of truth: payment status lives next to the order, subscription, or invoice — not on a separate screen.
- Automatic reconciliation: every charge, fee, and refund matches your accounting without manual spreadsheets.
- Frictionless experience: checkout inside your brand, with the methods your customers actually use.
- Local invoicing: Mexico’s CFDI and Colombia’s DIAN e-invoicing fire from the same flow.
- Scalability: adding subscriptions, installments, or a second country does not break what already works.
A payment link or a generic plugin is fine to start. But as volume grows, you get duplicate charges, “paid” orders that were never confirmed, and hours lost reconciling by hand. That is where a custom integration pays for itself.
The gateway map in Mexico and Colombia
Mexico
Mercado Pago leads on reach and trust; Stripe and Conekta are strong for product/SaaS with solid APIs; Clip and PayU add terminals and acquiring. The distinctive feature of the Mexican market is interest-free installments (MSI — meses sin intereses): for high tickets, offering 3, 6, or 12 MSI changes conversion. You also need to solve CFDI (e-invoicing) tied to the charge.
Colombia
The key method is PSE (debit straight from the bank account), essential for many buyers. Wompi (Bancolombia group), ePayco, PayU, and Mercado Pago cover cards, PSE, and wallets like Nequi and Daviplata. DIAN e-invoicing must be issued correctly and on time. Without PSE properly integrated, you leave sales on the table.
Practical rule: do not pick the gateway by the fee on its landing page. Pick by the payment methods your customers use, API and webhook quality, subscription or split support, and country coverage if you sell in both markets.
Integration patterns that work
1. Hosted checkout — the best first step
The gateway hosts the payment screen; you redirect and receive the result via webhook. Lower PCI scope, faster to launch. Ideal for a first charge in production in 1–3 weeks for e-commerce or a one-time payment.
2. Embedded payment with tokenization (API)
The form lives in your product, but card data is tokenized on the gateway side (Elements, Bricks, or an equivalent SDK). Better experience and control, with a bounded PCI scope (SAQ A). This is the typical pattern for SaaS and apps that want their own checkout.
3. Webhooks + state machine (non-negotiable)
Payment is asynchronous: never trust the browser redirect. The truth arrives by webhook (approved, declined, under review, chargeback). You need idempotency (never process the same event twice), retries, and a clear state machine for the order or subscription.
4. Subscriptions, split, and marketplaces
Recurring charges with retry handling and expired-card recovery (dunning); split payments for marketplaces that pay out several sellers; and installments/MSI in Mexico. Each one adds rules worth modeling well from the start, not patching later.
Highest-ROI use cases in LATAM
- E-commerce / marketplace: checkout with cards, MSI (MX) and PSE (CO), plus split to sellers.
- Subscription SaaS: recurring billing, upgrades/downgrades, proration, and dunning.
- B2B portal: invoice payment via transfer/PSE and reconciliation against the ERP.
- Mobile apps: in-app charges outside the stores (services, not digital goods).
- Payment links / remote charges: for sales assisted over WhatsApp or phone.
- Collections + invoicing: issue CFDI/DIAN automatically when the payment confirms.
Common (and expensive) mistakes
- Marking the order paid on the redirect instead of waiting for the webhook → phantom orders.
- Not handling idempotency → duplicate charges or shipments when the gateway retries the webhook.
- Ignoring refunds, chargebacks, and disputes until the first one happens.
- Leaving e-invoicing (CFDI/DIAN) for the end of the project.
- Storing card data yourself instead of tokenizing → needless PCI risk.
- Not reconciling fees and settlements → accounting never matches.
- Choosing a single gateway with no plan B for downtime or low approval rates.
What a first charge costs and how long it takes
A hosted checkout with webhook confirmation and order states is usually in production in 1–3 weeks, depending on API quality, whether you need invoicing, and which local methods (MSI, PSE) you add. Subscriptions with dunning, or a marketplace with split and settlements, add several weeks for the business rules and edge cases.
Cost depends more on the logic (subscription, split, installments, multi-country, reconciliation, invoicing) than on the chosen gateway. The healthy path is to budget by milestones — discovery → first checkout in staging → production with webhooks, reconciliation, and monitoring — tied to deliverables. For regional custom-software cost ranges, see the LATAM cost guide as well.
Checklist before you integrate
- Which methods do your customers actually use? (card, MSI, PSE, transfer, wallet)
- Do you need a one-time payment, subscription, split, or installments?
- Do you sell in one country or both (MX and CO) with a single integration?
- How do you issue the invoice (CFDI/DIAN), and at what moment?
- Who reconciles fees, refunds, and settlements — by hand or automatically?
- Do you have a sandbox and a plan for handling failed webhooks?
- What happens on a chargeback or dispute, and who operates it?
- Who maintains the integration over 6–12 months (code, repos, monitoring)?
Related resources
Payment integration almost never travels alone: it usually touches your ERP, your operations, and your budget. These guides complement this read:
At DIPA Solutions we integrate payment gateways inside custom software for companies in Mexico, Colombia, and LATAM. We work API-first: connect Mercado Pago, Stripe, Conekta, PSE, or Wompi to your e-commerce, SaaS, portal, or ERP — with reliable webhooks, reconciliation, and e-invoicing, and demonstrable deliveries per flow.
Related service
Software Factory
Nearshore custom software for US & UK teams — web platforms, mobile apps and integrations from a senior LATAM studio.
View serviceRelated case study
TOCO
TOCO Warranty sells vehicle coverage for the modern driver. The work went beyond screens: we rebuilt the customer experience and refactored the internal stack that runs the business — Salesforce, APIs, and payment integrations — so sales, ops, and billing share one coherent flow.
View case studyFrequently asked questions
- How much does it cost to integrate a payment gateway with custom software?
- It depends on the logic more than on the gateway. A hosted checkout with webhook confirmation costs far less than subscriptions with dunning or a marketplace with split and settlements. The recommended path is to start with one measurable first charge flow, then scale with real data, budgeting by milestones.
- Which gateway is best in Mexico and Colombia?
- There is no single answer: it depends on your customers. In Mexico, Mercado Pago, Stripe, and Conekta are strong, and interest-free installments (MSI) matter for high tickets. In Colombia, PSE is nearly mandatory, and Wompi, ePayco, PayU, and Mercado Pago cover it. If you sell in both countries, an architecture that supports more than one gateway is worth it.
- Why isn’t a pay button or link enough?
- To start, it is enough. But as you grow you get “paid” orders that were never confirmed, duplicate charges, and hours of manual reconciliation. Integrating payments into your software gives you reliable webhook confirmation, order status next to the payment, automatic reconciliation, and local invoicing (CFDI/DIAN) from the same flow.
- Do I need PCI compliance if I integrate payments?
- You can almost always reduce PCI scope by using a hosted checkout or gateway-side tokenization (SAQ A), without storing card data on your servers. Storing cards yourself increases PCI scope and risk; it is rarely worth it. We define this per your case during discovery.
- Can you integrate payments with my ERP or e-invoicing?
- Yes. One of the highest-ROI cases is closing the loop: confirmed charge → order/invoice in the ERP → CFDI (Mexico) or DIAN invoice (Colombia) issued automatically → reconciliation of fees and settlements. We work API-first so payments, ERP, and invoicing stay aligned.
Keep reading
11 min read
Manufacturing software in Mexico and Colombia: a practical guide to digitizing operations
A practical guide for manufacturers that need to digitize production, quality, inventory, and maintenance without replacing the entire ERP.
Read article12 min read
Healthcare software development in LATAM: custom healthtech in Mexico and Colombia
Off-the-shelf software rarely fits a clinic, lab, or insurer. A practical guide to building custom healthtech in Mexico and Colombia — use cases, HL7/FHIR interoperability, compliance (NOM-024, Ley 1581), and costs.
Read article11 min read
Custom B2B customer portal in LATAM: when to build it and how to integrate it
A B2B portal is not just a customer login. Done well, it reduces repetitive emails, connects orders and invoices to ERP/CRM, and turns manual operations into measurable self-service.
Read articleNeed to charge online without the headaches?
Tell us what you sell and which gateway you want (Mercado Pago, Stripe, PSE, Wompi, or another). We help scope the charge, reconciliation, and invoicing flow and ship a first checkout to production — first call, no commitment.