The payments industry is a complex system of pieces, all working together to make it possible for a consumer to purchase an item or a service simply by inserting a card at a retail location or entering their payment credentials into a web site.

What happens after the consumer initiates the transaction involves the customer’s bank, the merchant’s bank, and players in between, all of whom have important roles to play in protecting the system from risk and getting the transaction data where it needs to go.

Which brings us to the term “payment gateway.” It’s often mentioned as a necessary piece of the puzzle. But what – exactly – is it?

In its simplest terms, a payment gateway is just that – an entry point into the payments system. It’s a function that sits between the merchant and the processor to capture and encrypt card and transaction data. The gateway packages the data and submits it on the merchant’s behalf to the processor for routing of the transaction to the card networks and issuing bank.

In a brick-and-mortar retail store, the gateway can act as an intermediary between the software in the POS terminal and the payment processor or processors, passing along the transaction message from one place to another. During online transactions, it may be offered through an API that integrates with the point of purchase.

A variety of companies offer gateway services. Some firms such as Authorize.net offer standalone payment gateways. Processors and merchant acquirers such as Worldpay from FIS also provide payment gateways as part of their suite of acquiring services.

Payment gateways originated in conjunction with ecommerce. When the original ecommerce websites started, they found it difficult to integrate with the rigid but steady and reliable infrastructure of payment processors. It was so difficult and time-consuming (taking a year or more to become certified) that new technology was innovated to connect and certify to each processor once, while allowing e-commerce merchants to more quickly and easily integrate a more modern interface.

This morphed over the past 20 years to SDKs and flexible APIs, adding tokenization and other features, branching out to many specific segments and verticals. Today there are dozens, maybe even hundreds, of payment gateways with different features and capabilities.

A payment facilitator may include payment gateway services in the solutions it bundles together to provide to its own submerchants. Or it may choose to be gateway-agnostic and set up the needed technical integrations to support the gateways its submerchants choose.