text: What Is a Payment Gateway?
  A payment gateway is a technology used by merchants to accept debit or credit card purchases from customers. The term includes not only the physical card-reading devices found in brick-and-mortar retail stores but also the payment processing portals found in online stores.
  Brick-and-mortar payment gateways also have begun accepting phone-based payments using QR codes or Near Field Communication (NFC) technology.
  - Payment gateways are interfaces used to collect consumer payment information.
  - In physical stores, payment gateways consist of the point-of-sale (POS) terminals used to accept credit card information by card or by smartphone.
  - In online stores, payment gateways are the “checkout” portals used to enter credit card information or credentials for services.
  - Payment gateways are distinct from payment processors, which use customer information to collect payments on behalf of the merchant.
  - There are also payment gateways to facilitate payment in cryptocurrencies like Bitcoin.
  How Payment Gateways Work
  The payment gateway is a key component of the electronic payment processing system, as it is the front-end technology responsible for sending customer information to the merchant-acquiring bank, where the transaction is then processed.
  Payment gateway technologies are always evolving to reflect new consumer tastes and technical capacities.
  In the past, terminals would accept credit cards using magnetic strips and required paper signatures from the customer.
  With the development of chip technologies, the signature phase could be removed in favor of a personal identification number (PIN) entered directly into the payment gateway hardware. The accuracy of the entered identification number is handled using the Luhn algorithm. Today, contactless purchases are also available, with many customers now using their phones as payment devices instead of plastic credit cards.
  The architecture of a payment gateway will differ depending on whether it is an in-store gateway or an online payment portal. Online payment gateways will require application programming interfaces (APIs) that allow the website in question to communicate with the underlying payment processing network. In-store payment gateways will use a POS terminal that connects to the payment processing network electronically using either a phone line or an internet connection.
  Payment Gateway vs. Payment Processor
  A payment gateway is distinct from a payment processor, a service that connects the customer's bank to the merchant account and facilitates the actual movement of money.
  There are essentially two halves of the transaction: a payment gateway that collects customer information for payment, and a payment processor that uses that information to contact the customer's bank and the merchant account, debiting one account and crediting the other.
  A payment gateway collects customer card information and encrypts it for later processing. A payment processor uses that information to charge the customers' bank or credit card provider.
  Example of a Payment Gateway
  Merchants can gain access to payment gateway systems through merchant acquiring bank partnerships or they can use their own payment gateway system. Large banks such as Bank of America (BAC) and JPMorgan Chase (JPM) have sophisticated payment gateway systems that they offer to customers along with their own merchant acquiring bank services.
  Ultimately, merchants can choose a variety of payment gateway technologies as long as they are compatible with the merchant acquiring bank that is being used for payment processing.
  One recent example of a payment gateway is Square (SQ), which emphasizes flexible mobile payments for retail businesses. Block Inc.'s Square Reader technology allows customers to easily accept payments at ad-hoc locations such as conventions or farmer’s markets, or through roaming storefronts such as food trucks.
  With the Square Reader payment gateway technology, a merchant can attach a small piece of hardware to their mobile phone, which allows the customer to swipe their payment card for processing through the mobile phone’s electronic connection. The Square Reader sends the payment information to a merchant’s acquiring bank, which then processes the information for the merchant momentarily.
  It is likely that new products will continue to increase the versatility and speed of payment gateways. In recent years, blockchain startups have even introduced payment gateways for cryptocurrencies.
  How Much Does a Payment Gateway Cost?
  Payment gateways typically charge a combination of initial setup fees, a flat monthly fee, and a small fee for each transaction. Some gateways may also charge a fraction of each purchase. For example, Square charges a 10-cent fee on most card transactions, as well as 2.6% of payment volume.
  What Is a White Label Payment Gateway?
  A white label payment gateway is a payment gateway whose branding can be customized according to their client's preferences. This allows merchants to receive payments through third-party services while using their own name and brand.
  Can I Build My Own Payment Gateway?
  While you could build a payment gateway from scratch, it would probably be too expensive to be worthwhile. The technology consulting firm Softjourn estimates that building a minimal gateway, to process credit and debit card transactions could cost a quarter of a million dollars, not to mention the additional headaches of international transactions, foreign currencies, and regulatory compliance.
  Is Google Wallet a Payment Gateway?
  Google Wallet, formerly known as Google Pay, is a digital wallet that makes it easier to interact with payment gateways. Instead of carrying around a credit or debit card, users can store encrypted card data on their phones, allowing them to safely pay without having their cards present.
  Is PayPal a Payment Gateway or Processor?
  While sometimes described as a payment provider, PayPal provides similar services to both a payment gateway and a payment processor. PayPal's merchant accounts share many properties with a processor, allowing merchants to safely accept and redeem payments to their bank accounts. PayPal also offers a gateway service called PayFlow.
  The Bottom Line
  Payment gateways, which are interfaces used to collect consumer payment information, are an important feature of the digital economy. By allowing customers to safely and securely share their credit card information, these systems reduce some of the barriers to online commerce.
  While the first payment gateways consisted of simple card-reading devices, they are now sophisticated systems to collect and authenticate PINs, signatures, and other data for merchant transactions.