i2medialab

My shopping cart

You have no items in your shopping cart.

Generales | Marketing

The Importance of Maintaining Control Over Your Payment System

A Payment Gateway Shouldn't Control Your Business

The meeting lasted less than twenty minutes.

The sales team had identified an interesting opportunity.

A new payment provider was offering more favorable terms for a particular customer segment.

The proposal seemed simple: add this alternative to the ecommerce platform and evaluate its results.

Until someone asked:

"How much work would it take to integrate it?"

The answer wasn't what they expected.

The checkout needed to be modified.

The way orders were generated had to be reviewed.

Purchase statuses needed to be adapted.

Part of the confirmation logic had to be changed.

And they had to make sure none of these changes would affect existing operations.

What seemed like a relatively simple business decision had turned into a development project.

Not because the new provider was particularly complex.

But because the system had been built around the previous provider.

And that's when a much more important question emerged, one that went beyond the integration itself:

Who was really defining the possibilities of the business?

The problem wasn't the payment gateway

A payment gateway serves a fundamental purpose.

It makes it possible to process transactions, connect with different payment methods, and manage information about the outcome of a transaction.

But selling and collecting payment are not exactly the same thing.

Think about a purchase in an ecommerce store.

The customer selects products.

The system calculates the amount.

The corresponding commercial conditions are applied.

An order is created.

The customer chooses how to pay.

The provider processes the payment attempt.

Finally, the ecommerce platform needs to know the result to continue the operation.

These actions are related.

But they represent different responsibilities.

The order describes what is being purchased.

The payment describes how that purchase is being paid for.

When these two concepts become too tightly coupled, any change in payment processing can end up affecting the business logic.

And that creates dependencies that are difficult to manage.

AN ORDER IS NOT A PAYMENT

This distinction may seem technical, but it has concrete consequences.

Suppose someone buys three products for $150,000.

The order represents that purchase.

It contains the products, quantities, amounts, and applied commercial conditions.

Now imagine that the first payment attempt is declined.

Does the purchase cease to exist?

Not necessarily.

The customer could try again using another payment method.

They could choose another available provider.

Or the transaction could remain pending until confirmation is received.

In all these cases, the business still needs to recognize the same purchase intent.

That's why it's important for the system to distinguish between:

The commercial order.

And the different payment attempts or transactions associated with it.

This separation makes it possible to manage situations that would otherwise be difficult to represent.

A pending payment shouldn't be confused with a nonexistent purchase.

A declined attempt shouldn't necessarily generate an entirely new order.

And a payment confirmation should be accurately linked to the corresponding transaction.

The architecture needs to represent this reality correctly.

WHEN THE PROVIDER BECOMES THE ARCHITECTURE

At first, directly integrating a payment gateway may seem like the fastest option.

The checkout uses its components.

The application interprets its responses.

Internal statuses mirror the provider's statuses.

Confirmations directly update orders.

Everything works.

Until a new need arises.

The company wants to add another provider.

But the second provider uses different identifiers.

It has different transaction statuses.

Its confirmation mechanisms are not identical.

It may handle refunds, authorizations, or pending payments differently.

That's when we discover that the system hasn't developed its own payment logic.

It has incorporated a provider's logic as if it were the business's own logic.

The integration stopped being a connection and became a structural dependency.

This doesn't mean that using a single provider is wrong.

Many companies can operate perfectly well with just one.

The problem arises when the architecture makes it impossible to change that decision without modifying parts of the ecommerce platform that should remain independent.

The business changes. Can the architecture keep up?

Today, a company may sell physical products with immediate payment.

Tomorrow, it might introduce services.

Later, reservations.

Perhaps partial payments.

Or different alternatives depending on the country, currency, or type of customer.

Not all these business models require exactly the same payment flow.

A traditional purchase may require a single payment.

A reservation may require a deposit.

A service may be billed in stages.

A B2B transaction may involve different payment terms.

And a company entering another market may need to integrate a local provider.

These decisions should come from the business strategy.

Not from the limitations of an integration implemented years ago.

Of course, each model needs its own rules, controls, and validations.

Separating the architecture doesn't mean that every payment model can be added automatically.

It means the system is better prepared to evolve without forcing the company to rebuild everything from scratch.

THE LAYER THAT CHANGES THE RELATIONSHIP WITH PROVIDERS

Now imagine a different architecture.

The ecommerce platform manages its products, prices, commercial conditions, and orders.

When it's time to collect payment, it uses an integration layer that connects the transaction with the corresponding provider.

That layer can handle adapting requests and responses, mapping identifiers, and translating provider results into statuses that make sense to the business.

This way, the checkout and order management system don't need to know every internal detail of each payment gateway.

The commercial operation maintains its own structure.

And providers integrate into it.

This doesn't eliminate technical work.

Each provider requires its integration to be implemented and maintained.

Errors, confirmations, security, reconciliation, and the particularities of each payment method must also be considered.

But it allows us to concentrate that complexity in the right place, rather than spreading it throughout the entire ecommerce platform.

The difference is significant.

Developing a new integration is one thing.

Having to modify the entire commercial operation every time the payment process changes is something entirely different.

WHAT HAPPENS WHEN PAYMENT ISN'T CONFIRMED IMMEDIATELY?

This is one of the areas where good architecture demonstrates its value.

Not all transactions are resolved instantly.

Some require subsequent confirmations.

Others may remain pending.

There are also declines, cancellations, and refunds.

The customer may even close the window before returning to the ecommerce platform.

That's why it's not enough to interpret what appears on the screen after a payment attempt.

The system needs reliable mechanisms to receive and verify confirmations from the provider.

And it must prevent duplicate notifications from triggering the same operation twice.

The commercial order needs to maintain a consistent status, regardless of how the result was communicated.

Here, separating orders from payments stops being merely an architectural preference.

It becomes a way to reduce operational inconsistencies.

Because processing payments correctly isn't just about initiating a transaction.

It also means knowing what happened afterward.

FLEXIBILITY DOESN'T MEAN INTEGRATING EVERYTHING

There's a common temptation when we talk about modular architectures.

To assume that a flexible platform should include every payment gateway, every payment method, and every imaginable business model from day one.

Not necessarily.

Flexibility isn't about building features the business doesn't need yet.

It's about making design decisions that don't unnecessarily limit future possibilities.

A company can start with a single provider.

And still keep its business logic separate.

It can operate with just one payment model.

Without making its entire architecture dependent on that model.

It can implement only the integrations it needs.

Without making them the center of the operation.

This approach is especially relevant in ecommerce and enterprise platform projects, where payments, product management, orders, internal systems, and commercial processes need to coexist.

At i2medialab, ecommerce development, payment integrations, APIs, and enterprise solutions are part of the same vision: designing technology that supports business needs and can evolve alongside them.

LET'S RETURN TO THE MEETING

The company still wants to add a new payment gateway.

The business opportunity is still attractive.

But now imagine that the architecture had been designed differently.

The checkout doesn't depend directly on the particularities of a single provider.

Orders maintain their own logic.

Payments are managed as related but independent operations.

And there's a layer designed to connect different services.

Adding the new provider still requires development, testing, and validation.

But it doesn't necessarily mean redesigning the entire sales process.

The conversation changes.

It's no longer about asking how much of the ecommerce platform will need to be rebuilt.

It's about evaluating whether the new provider offers a real advantage, how much it costs to integrate, and what impact it could have on operations.

Technology once again supports the business decision instead of restricting it.

That's the point.

A payment gateway is a fundamental component of an ecommerce platform.

But it shouldn't become the place where the entire business logic is defined.

Because providers can change.

Payment methods can evolve.

Markets can expand.

And business models can transform.

The architecture should ensure that these decisions remain where they belong:

in the hands of the business.

Current display currency

The preference changes how amounts are displayed. Payment is confirmed only in a currency supported by the payment method.