If you run an ecommerce store, you need a way for customers to pay you online. A payment gateway provides the technology that securely connects your website or app to the payment system that processes a transaction.
But how exactly does a payment gateway work, and how does it differ from a payment processor or merchant account? Understanding these terms makes it easier to choose the right payment solution for your business.
What is a payment gateway?
A payment gateway is technology that securely transfers a customer’s payment details from a website, app or point of sale to the payment-processing system. In simple terms, the payment gateway sits between the customer, the merchant and the financial institutions involved in the transaction.
When a customer enters their payment details at checkout, the gateway securely sends the relevant payment data for authorisation. If the payment is approved, the gateway passes the result back to the merchant so the order can be completed.
A payment gateway can be used for online payments as well as certain in-store payment experiences. Payfast by Network provides a system that allows businesses to accept payments online using a range of methods.
How does a payment gateway work?

The process can look slightly different depending on the gateway and how it’s integrated into a business’s website or app.
For a typical ecommerce transaction, the process looks like this:
- The customer checks out: The customer adds products or services to their cart and proceeds to checkout.
- The customer selects a payment method: They choose how they want to pay and enter their payment details.
- The payment gateway securely transfers the data: The payment gateway sends the relevant payment data to the payment processor and other parties involved in the transaction.
- The transaction is authenticated and authorised: The customer’s bank and the payment network check the transaction and determine whether it can be approved.
- The result is returned to the merchant: The payment gateway communicates the outcome to the merchant; if it is successful, they can then complete the order.
- The funds are settled: The transaction moves through the payment system before the funds are made available to the merchant according to the provider’s settlement process.
With Payfast, customers are redirected to a secure payment page where they can select their preferred payment method. Payfast then processes the payment and notifies the ecommerce platform once it has been completed.
Why do you need a payment gateway?
You need a payment gateway to receive payments online via your ecommerce store. While different payment gateways offer different services, generally they should all give you peace of mind that your customer’s payments are being processed safely and securely.
What is the difference between a payment gateway, payment processor and merchant account?
These terms are often used interchangeably, but they refer to different parts of the payment process.
Payment gateway
A payment gateway securely passes payment information between the customer, merchant and payment-processing infrastructure. Think of the gateway as the technology that facilitates the secure transfer of payment data.
Payment processor
A payment processor handles the communication involved in processing the transaction between the merchant, payment network, acquiring bank and issuing bank. The processor routes the transaction and communicates whether it has been approved or declined.
Merchant account
A merchant account receives funds from card transactions before they are settled into the merchant’s bank account.
Not every business needs to open a separate merchant account when using a payment service provider. For example, Payfast allows businesses to sign up and receive payments without needing their own merchant bank account.
What are hosted and integrated payment gateways?
Businesses can implement payment gateways in different ways, depending on how much control they want over the checkout experience.
Hosted payment gateway
With a hosted gateway, the customer is taken to a secure payment page hosted by the payment provider to complete their payment.
This is the approach used in the Payfast payment flow described above. The customer is redirected to the secure Payfast payment engine, selects a payment method and completes the transaction before being returned to the merchant’s checkout flow.
Integrated payment gateway
An integrated gateway connects more closely with a merchant’s website or app, letting the payment experience remain within their own checkout environment. This approach can offer more control over the customer experience but may require more technical development.
The right approach depends on your type of business, your website or app, your development resources and the type of checkout experience you want to provide.
What happens behind the scenes when a customer makes a payment?
There is more happening during the payment process than what the customer sees on the checkout page.
- Authentication helps verify that the person making the payment is authorised to use the selected payment method. Additional authentication may be required, depending on the payment method, type of transaction and security measures in place.
- Authorisation is the process of checking whether the transaction can be approved. The issuing bank reviews the transaction and can approve or decline it based on factors such as available funds, account status and security checks.
- Encryption helps protect payment data as it moves between systems. It makes sensitive information harder for unauthorised parties to read.
- Tokenisation replaces sensitive payment information with a token that payment systems can use without exposing the original payment details.
- Settlement occurs once a transaction has been approved and processed. The funds then move through the relevant payment infrastructure before being settled to the merchant.
These steps happen quickly, working together to let the payment gateway and the wider payment-processing system move a transaction from checkout to completion.
What payment methods can a payment gateway support?
The payment methods available depend on the provider.
A payment gateway can support options such as:
- Credit cards
- Debit cards
- Instant EFT
- Digital wallets
- QR-based payment methods
- Other local and alternative payment methods
Payfast supports 18+ payment methods, giving businesses different ways to accept a payment from their customers. Offering several payment methods can make it easier for customers to choose an option they already know and trust.
What are the benefits of a payment gateway?
The benefits of a payment gateway extend beyond simply allowing customers to pay.
- More ways for customers to pay: Payment gateways can give customers access to different payment methods through one checkout experience.
- Secure payment processing: A secure payment gateway helps protect payment details as they move between the customer, merchant and payment-processing infrastructure.
- Easier online payments: Instead of building payment-processing infrastructure from scratch, businesses can use a payment gateway to connect their website or app to an established payment system.
- Access to payment information: Payment gateways can provide transaction information that helps businesses monitor payments, reconcile transactions and manage their online sales.
- Support for ecommerce growth: As a business grows, a payment gateway can help it accept payments from more customers without building its own payment-processing infrastructure.
Choosing a payment gateway for your business
A payment gateway is an important part of accepting online payments, but it is only one part of the wider payment process. Understanding the difference between a payment gateway, payment processor and merchant account makes it easier to compare providers and choose a solution that fits your business.
Payfast gives businesses a way to accept payments online through multiple payment methods, with integrations for ecommerce platforms, as well as custom integration options.
How do you set up a payment gateway?
There are several ways websites can integrate into a payment gateway. Some require developers to be involved and are complex, while others work with pre-built shopping carts, that usually just require an ID and other basic information from the gateway, in order to be integrated.
Setting up your Payfast payment gateway
Setting up Payfast as your payment gateway is a simple process that can literally take minutes depending on your ecommerce platform. Payfast integrates with over 80 different shopping cart platforms, including Shopify, WooCommerce, Ecwid and PrestaShop as well as custom integration. Take a look at our shopping carts page to find your platform’s listing which will include information on how to set up the Payfast payment gateway on your online store.
When setting up your online store it’s important to sign up and get your payment gateway up and running quickly so that you can start receiving payments as soon as you’re open for business. With the right business model and payment gateway, there’s no stopping what your online store can accomplish.