



Every year, the global number of ecommerce transactions is in the trillions (yes, trillions). We buy products and services online every day, often without consideration for the sophisticated technology that makes it all possible. When it comes to online shopping, payment gateways are the real MVP of the purchase process. They are what allow us to send secure payments reliably and quickly every day.
Here are the fundamentals of this online payment technology and how it works.
What you’ll learn:
- What is an ecommerce payment gateway?
- Types of ecommerce payment gateways
- What are the common payment processing methods?
- The importance of secure payment gateways
- What are the challenges of ecommerce payment processing?
- How to choose the best payment gateway for your business
- Tips for integrating a payment gateway with your online store
What is an ecommerce payment gateway?
An ecommerce payment gateway is software that enables electronic payments online. It collects customer payment details and serves as an interface between your ecommerce site, your bank, and your customers' bank accounts to facilitate financial transactions. It's one of the most foundational parts of ecommerce — and an ineffective gateway could halt your entire operation.
As soon as your customers submit payment details at checkout, the payment gateway kicks in to perform several complex actions:
- Encryption: Your payment gateway will scramble financial data into an unreadable form, and automatically examine it for signs of fraud. Next, the data is forwarded to your merchant account.
- Verification and authorization: Your bank then sends the payment information to your customer's bank for verification and authorization. Once received, the verification is sent back to your merchant account.
- Confirmation: Finally, based on whether the customer's bank has authorized the purchase, the payment gateway triggers either a confirmation or a failure message. If the transaction was successful, money is debited from the customer's bank and credited to yours.
By initiating this process and securing the data, ecommerce payment gateways act as essential connections between customer-facing websites and behind-the-scenes financial operations. Without these gateways, ecommerce cannot function.

Get insight to move your business forward
Learn how 2,700 commerce leaders are finding success in a changing market.
Types of ecommerce payment gateways
There are three primary types of ecommerce payment gateways. The best choice for your business depends on the size of your organization and how many technical resources you can devote to it.
Hosted
A hosted payment gateway is owned and fully managed by a third party. It redirects customers to a separate site, which can sometimes be white-labeled (designed with your brand’s look and feel), though it often displays the gateway provider's own branding. An example of this would be paying with PayPal at a checkout: The customer is temporarily sent to PayPal’s site to log in and provide credentials, then sent back to the merchant to complete the process.
Hosted gateways offer the most convenience and require minimal setup. However, the customer experience of a hosted payment gateway can often feel disjointed when they are redirected to another site.
Self-hosted
With a self-hosted payment gateway, you integrate a pre-built gateway into your tech stack — but you don't have to build the gateway from scratch. This option requires more technical effort from your organization, though many vendors provide documentation to help guide the implementation process. If you decide to self-host a gateway, you will also need to secure customers' sensitive financial data. Fortunately, gateway providers typically provide security features like encryption and fraud detection.
Self-hosted payment gateways are ideal for small to midsize businesses that want full control over their checkout pages but lack the resources to build payment gateway functions from the ground up.
API-hosted
Enterprises seeking complete control over their payment gateways often opt for one built on application programming interfaces (APIs). APIs are tools that help different applications communicate with each other. With an API-hosted payment gateway, these APIs relay payment information from your site to the appropriate financial institutions.
However, implementing API-hosted gateways generally demands the largest resource investment, since integrating APIs with the rest of your site is a highly technical process. This also means that all security obligations fall on your organization as well, including encryption certificates, data prevention, and fraud detection. For organizations with the resources to spare, an API-hosted gateway offers greater flexibility and control over checkout pages.
What are the common payment processing methods?
The most common method of processing online payments is via credit card.
Ecommerce payment gateways process credit card payments by triggering a process that sends credit card information to your bank, the customer's bank, and the credit card scheme. Credit card payments are near-ubiquitous and will likely be any payment gateway's default payment processing method. In addition, some gateways accommodate alternative forms of payment:
- Redirects: These take customers to a secondary site where they have an account to complete their purchase.
- Digital wallets: Wallet programs store payment information on a browser or mobile device, enabling customers to pay with one click.
- Money transfer apps: These services allow customers to send money from their bank accounts to your business, another institution, or an individual.
- Automatic clearing house (ACH) payments: Most people know these as direct deposit.
Depending on your customers' preferences, offering some of these options in addition to debit card and credit card processing may be worthwhile. Fifty-three percent of people pay with digital wallets more often than they do with traditional methods, and more than 70% said they'd use that as their primary method, according to a Forbes Advisor survey.
While it's best to offer a few alternative modes of payment, credit card processing is necessary to keep your online store functional.
The importance of secure online payment gateways
Making a purchase online is an act of trust. Your customers trust you to represent your products accurately, deliver them quickly, and, most importantly, safeguard their financial information. A breach of this trust can result in lost business and reputational damage. The Baymard Institute reported that 25% of consumers have abandoned their shopping carts at checkout because they didn't trust a website with their financial information.
To secure customer data and preserve trust, it's essential to automatically encrypt financial data. For organizations using API-hosted gateways, purchasing an SSL or TLS certificate is necessary to guarantee an encrypted connection. Payment gateway providers typically handle encryption for you. If your organization's servers store or process credit card data, you'll need to comply with rules known as the Payment Card Industry Data Security Standards (PCI DSS). These standards are designed to ensure that businesses take necessary measures to protect credit card information.
Although PCI compliance isn't required by law, most banks and payment service providers only work with compliant companies. Maintaining compliance requires following several security best practices, such as establishing a firewall and monitoring access to customer financial data.

You have data. But do you have data intelligence?
Learn how to unify data from across your business and turn insights into action.
What are the challenges of ecommerce payment processing?
When a disruption occurs and the payment sequence isn’t seamless, customers tend to abandon their carts. It's important to recognize some of the common challenges of payment processing to prevent these kinds of disruptions. Here are a few challenges along with details about how to avoid them.
Security lapses: Encryption failures or poor PCI compliance can invite hackers to steal customer data, leading to a loss of trust. Ensure your organization is secure and compliant, and verify that your partners are as well.
Site lags or crashes: If a website is slow or crashes, 17% of shoppers will abandon a sale, according to the Baymard Institute. Customers demand constant uptime, so invest in a reliable gateway and work with a trustworthy gateway provider that offers proven system resilience.
False declines: Sometimes, payment declines can occur as the result of technical problems with your payment gateway rather than insufficient funds. Problems may arise from poor site integration, data miscommunication, or similar issues. Conduct thorough testing before launch and partner with a trusted provider to reduce risks.
Payment acceptance failures: False declines can also occur when a business is not prepared to accept certain types of international payment types. When setting up your gateway, ensure that at least one processing mode will allow you to accept payment from international customers.
Transaction fees: While not a performance issue, the buildup of transaction fees can present a significant challenge for many organizations. Credit card transaction fees are inevitable in ecommerce, but there are ways to reduce their impact. Research different types of fee schemes to identify which one works best for you, and select a provider that limits extra charges, such as setup fees.
How to choose the best payment gateway for your business
When you select your ecommerce payment gateway, there are several elements to consider. Here are some factors that should influence your decision.
- What type of gateway you need: First, decide whether a hosted, self-hosted, or API-hosted solution is right for you. As mentioned earlier, hosted solutions are typically best for smaller businesses. Midsize businesses tend to benefit from self-hosting, and enterprises often prefer API-hosted.
- The qualities you need in a provider: The payment processor you work with matters, especially if you choose a hosted or self-hosted gateway. Look for a payment solution partner that values security, provides reliable performance, and offers solid customer service.
- Payment processing modes supported: Select a gateway that accepts all payment methods your customers may want to use, and confirm that it accepts international credit cards if you have a global business.
- Technologies it can integrate with: A gateway that cannot integrate with your ecommerce software is a nonstarter. However, you may want to consider whether it integrate with a mobile site, customer service chatbots, or even your social media pages.
Transaction fee schemes: All payment processors will need to charge small fees on behalf of the involved banks, credit card companies, and themselves. Different providers use various fee schemes, each impacting your business uniquely. For example, some providers charge flat rates or offer a subscription service, which can work well for companies with high order volumes. Others may employ variable fee schemes that could offer savings for merchants with lower order volumes.
Tips for integrating a payment gateway with your online store
The exact steps needed to implement a payment gateway depend on the type of gateway it is. Signing up with a hosted gateway differs greatly from having a team of developers build an API-hosted gateway. Here are the key stages to complete:
- Consultation: When integrating a payment gateway with your online store, your first step is to consult with the provider and follow their advice and documentation. Working closely with the provider alleviates some of the burden on your organization while ensuring that your implementation is secure and effective.
- Preparation: Depending on the type of gateway you select, you may also need to prepare other parts of your business, such as updating existing systems so they can integrate with the gateway or improving your security measures. However, if you choose a hosted or self-hosted gateway, you can offload much of the backend requirements onto the provider.
- Testing: Once your gateway is implemented, test it thoroughly before your site goes live. This should include both manual and automated tests to check for functionality and security.
Give customers a frictionless payment experience
Carefully assess what you need from your payment gateway before you settle on your approach. It’s critical to find a solution and provider that understands your business. When you implement the right payment gateway, customers will appreciate the easy experience you provide — and will be eager to return for more.
Keep up with the latest commerce trends, insights, and conversations.
Ready to take the next step with the Commerce Cloud?
Talk to an expert.
Tell us a bit more so the right person can reach out faster.
Stay up to date.
Get the latest research, industry insights, and product news delivered straight to your inbox.