According to the latest research, the e-commerce share of sales continues to grow. This year, online sales represented around 13% growth in comparison to last year’s figures. Currently, online sales are forecasted to continue to grow up to 17% by 2022. Below, we reveal some of the secrets of the heart of e-commerce business – payments gateways: how to choose the best one, and how to add a payment gateway to a website.

Basics of Payment Gateways

In our previous article, you can read about the basics of payments, such as what the role of a payment gateway is and how it works. However, here, we explain the nuances of choosing a good and reliable one, and how to include a payment gateway in a website.

The online shop software or platform you already use may provide payment gateway services, and you can quickly and hassle-free add a payment gateway to a website. To check payment gateway availability, you should visit the control panel or admin page on the website.

Requirements for an E-Commerce Payment Gateway

To maximize efficiency for your business, the payment gateway should meet some really basic requirements, such as usability and anonymity. In addition to these things, other means of enhancing your e-commerce website with payment gateway include making sure the gateway is:

  • Economic – We’re certainly not saying to just blindly pick the cheapest one, but make sure it’s competitive.
  • Secure – Payment gateways should have PCI DSS certification in the event you are going to accept credit cards.
  • Responsible – If your system is scheduled to experience any downtime or slowdown, make sure notification is shown in advance and with multiple repetition via different channels, so your customers are not caught off guard.
  • Flexible – For example, if a development team needs a month to integrate the gateway – that’s stifling to your business needs. Instead, choose a gateway that will be able adapt quickly to current business requirements and deliver a faster time to market.
  • Global – Choose a payment gateway that is able to support you worldwide, or at least, by a majority of your locations. You should also have a broad portfolio of payment methods and providers.
  • Informative – Gateways should have an easy-to-use administration panel, as well as reporting and business intelligence tools. As a bonus, it’s also good to have technical and business KPI dashboards, and a monitoring and alerting system.
  • Versatile – The chosen solution must be an endpoint for all payment methods, meaning you shouldn’t need integration of new API/security for another payment method.
  • Scalable – Your chosen payment gateway must be able to fulfill your needs while your business grows.

Features for the Payment Gateway

Before you start to integrate a payment gateway on your website, it’s first necessary to decide what features you want to incorporate with the gateway. We’ve prepared a list of the features that are in the most demand:

  • Multi-language option – Go global by allowing your customers to interact hassle-free in the language they are most familiar with.
  • Fraud management system – Monitor incoming payments and prevent fraudulent transactions and transfers to keep your business safe.
  • Multi-channel processing – Accept payments seamlessly via various channels: online, on mobile devices, mail-order, and call center.
  • Multi-currency processing – Let customers make online payments in the currency they feel most comfortable with.
  • Multi-payment method – Accept credit cards, internet banking, cash payments and even PayPal transactions on a single integration.
  • Built-in analytics – Get reports and analyze your sales performance to obtain meaningful insights on how to enhance your business.

7 Most Popular Gateways

PayPal

The true behemoth in the payment industry, PayPal currently serves around 350k websites and 184 million customer accounts. Flexible enough to be equally advantageous for both small businesses and market leaders, PayPal doesn’t require any setup, gateway, or monthly fees. PayPal is fully devoted to streamlining business transactions, and is considered to be today’s strongest and most-reputed payment gateway. Currently, it is also the most international payment gateway, available on over 200 markets and accepting 26 leading currencies. In its commitment to security, PayPal adheres to all leading encryption standards, keeping payment credentials guarded.

Highlights:

  • Customized checkout – Designed as an enterprise-grade, PayPal Payments Pro lets users create a custom checkout process which means you can integrate all the layout and colors that match your company’s theme and brand.
  • Fully integrated payment system – PayPal works smoothly with all major e-commerce platforms, CRMs, and sales management tools.
  • Access to money within minutes – Once a payment is sent, it takes virtually minutes to make it available to you. The system offers you the option to keep the money on your PayPal account, or transfer it to your bank account.

Amazon Pay

To let business owners successfully interact with a worldwide audience, Amazon Pay operates in various languages and supports leading currencies. Amazon’s guarantee makes all transactions fully secure, and you don’t have to charge additional fees for that. This platform can also boast a fully-featured e-commerce suite that is advantageous to promote, sell and manage products and orders. In this way, Amazon Payments may interest you if you want to optimize your marketplace activities, and be represented as a reliable vendor with a solid reputation.

Highlights:

  • Optimized conversion rates – Amazon strives to assist merchants in streamlining their customers’ checkout experience, resulting in less cart abandonment and converting visitors into loyal customers.
  • Merchant-protection plans – Amazon uses incredibly strict protocols when it comes to information security. The system bears a vaunted security setup that includes fraud detection and merchant protection.
  • Retail-first approach – It is designed specifically for online retailers to provide their customers with smooth and seamless shopping experience.

Stripe

Created by industry experts, Stripe is an extremely developer-centric payment software. This means you’ll be able build production-ready integrations using any modern tools – from React components and up to real-time webhooks. If you opt for the Stripe payment platform, you also choose less long-term maintenance and more concentration on customer and product experience. Stripe processes charges and displays prices in the customer’s preferred currency, which improves sales and helps customers avoid conversion costs.

Highlights:

  • Customized checkout experience – Stripe has an extensive UI toolkit to let you manage with front-end, design, and analytics. With such a benefit, you can easily build and customize your payment form and embed the checkout on your site using only a single line of JavaScript.
  • Multiple payment options – Go global by processing payments for all major credit and debit cards in every country. Digital wallets such as Alipay, Amex Express Checkout, and Apple Pay are available for customers who want a reliable way to pay without sharing their card information.
  • Easily accessible reports – Get all charge, fee, transfer, and refund information in real-time through Stripe’s API and dashboard.

2Checkout

2Checkout is another good payment gateway option. For only 16 years being on the market, 2Checkout is available in 196 countries, serves over 50k merchants, works with 87 different currencies and offers 15 languages to choose from. Customers enjoy this fully-featured payment solution for its robustness and low-cost fee structure. Another advantage is that you don’t have to pay any monthly or setup fees.

Highlights:

  • PCI DSS compliant – You can be sure about the security of any transaction processed by 2Checkout because it has PCI certification Level 1 – the highest certification possible, which guarantees total protection for both merchants and customers from fraud.
  • Worldwide accessibility – 2Checkout provides you with an opportunity to customize the platform according to the customer’s language and currency. As the business owner, you’re also free to offer localized payment options.
  • Support for all major payment methods – 2Checkout is well-known for its support of all the major payment methods and services, such as MasterCard, Visa, Discover, American Express, JCB, and PayPal.

Authorize.net

Developed to assist merchants in selling more in both local, and online stores, Authorize.net is one of the most sought-after payment gateways, as proven by the more than 400k merchants that use it worldwide. This platform is extremely well documented and has a range of tutorials and other training materials to give users confidence while managing this platform. Authorize has gained strong momentum among small and medium businesses by providing them an affordable and secure payment solution. You’ll also appreciate the 24/7 free support provided by professionals who will also assist you in solving any issue possible.

Highlights:

  • Check payments support – With Authorize.net, you can depend on an exclusive and fully integrated electronic payment method, which accepts and processes payments from bank accounts directly through the user’s website or the Authorize.Net Virtual Terminal.
  • VPOS – You can leverage Authorize.net as a so-called virtual point of sale. In the event that you already have a POS, it won’t be a challenge to integrate it.
  • Virtual terminal for manual transactions – This feature allows business owners who take orders via phone or email to submit transactions manually.

Skrill

Designed to be convenient for both businesses and individuals, Skrill is another good option to implement a payment gateway. This service is a preferable option to the many pricier platforms and gateways available because it allows you to create an account for free and charges only 1% of the transaction’s value on the sender’s side. Skrill is also easy to link to any bank account worldwide, and takes excellent care of the security of your payment information.

Highlights:

  • POS – Skrill is a treasure for online stores because it allows users to pay for purchases online with a Skrill account, which is a key feature since many users simply abandon their carts due to the lack of an immediate payment.
  • Mobile accounts and ATM – You can rest assured your account will work properly on your mobile device, enabling you to process transactions and payments wherever you are.
  • Supports buyers globally – To date, over 30 different currencies are supported by Skrill.

Adyen

The new evening star on the sky of payment solutions, Adyen has swiftly gained its popularity. And it’s no wonder – Adyen’s infrastructure meets the highest standards of security, integrity and stability. Another reason why we often advise Adyen as payment technology is that it can be connected to various productivity tools and business applications. Currently, Adyen’s functionality is synchronized with platforms such as Salesforce, Ebizmarts, Navitaire, Cegid, Hybris, and many more.

Highlights:

  • Supports major popular payment methods – Visa, MasterCard, PayPal, Discover, American Express, AliPay – and this list is far from complete when it comes to the payment methods supported by Adyen.
  • POS payments available – This payment gateway is a great choice to be your trustworthy partner in managing point-of-sale in Europe and the US.
  • Rich e-commerce functionality – With its full range of functions for mobile payments, Adyen is the perfect choice to make your service more attractive.

Payment Gateway Integration

Online payment gateway integration requires some technical skills and knowledge. So, let’s review the integration tutorial for PayPal as a payment gateway, with real code snippets using PHP. In the tutorial below, we’ll use PayPal’s Sandbox developer mode to work with the payment flow.

We receive payment from the buyer side and then store the payment transaction information to the database. PayPal has two payment environments – Sandbox and Real Time: the first is intended to assist developers in testing transactions before the project goes live, and the second is used after the project goes live. In this tutorial, we use the PayPal Sandbox test account.

To create a Sandbox account, proceed with the following steps:

  • Visit the PayPal developer and log in with your PayPal account. If you don’t already have PayPal account, create that first. Once the signup is completed, login to your account.
  • Right after you’re logged into your PayPal account, you will be redirected to the developer home page. Next,go to the Dashboard.
  • Сlick on the Accounts link under the Sandbox.
  • Сreate test accounts for both seller and buyer by selecting Business and Personal respectively from the Create Account link.

Next, we want to create two tables – products and payments.The products table is used to keep product details, while the payments table is used to keep transaction details from PayPal.

Products table:

CREATE TABLE IF NOT EXISTS `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`p_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`p_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`price` float(10,2) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

Payments table:

CREATE TABLE IF NOT EXISTS `payments` (
`payment_id` int(11) NOT NULL AUTO_INCREMENT,
`item_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`txn_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`payment_gross` float(10,2) NOT NULL,
`currency_code` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
`payment_status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

And now every product will be displayed from the products table. The product details are used in a form that contains item_name, item_number, currency, amount, and more parameters with the Buy Now button. After clicking Buy Now, the parameters are sent to PayPal Sandbox, as specifically mentioned in the form action.

<?php
$sql = "SELECT * FROM products";
$resultset = mysqli_query($conn, $sql) or die("database error:". mysqli_error($conn));
while( $row = mysqli_fetch_assoc($resultset) ) {
?>
<div class="col-sm-4 col-lg-4 col-md-4">
<div class="thumbnail">
<img src="images/<?php echo $row['p_image']; ?>"/>
<div class="caption">
<h4 class="pull-right">Price: <?php echo $row['price']; ?></h4>
<h4>Name: <?php echo $row['p_name']; ?></h4>
</div>
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<!-- Paypal business test account email id so that you can collect the payments. -->
<input type="hidden" name="business" value="<?php echo $paypal_email; ?>">
<!-- Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo $row['p_name']; ?>">
<input type="hidden" name="item_number" value="<?php echo $row['id']; ?>">
<input type="hidden" name="amount" value="<?php echo $row['price']; ?>">
<input type="hidden" name="currency_code" value="USD">
<!-- URLs -->
<input type='hidden' name='cancel_return' value='http://localhost/paypal_integration_php/cancel.php'>
<input type='hidden' name='return' value='http://localhost/paypal_integration_php/success.php'>
<!-- payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
</div>
</div>
<?php } ?>

When a payment is successful, the buyer is redirected to the success page. On the success page, we receive the transaction information with $_GET variable and input the transaction data to the database. Since the payment is successful, the success message appears to the buyer. If unsuccessful, the buyer sees the fail message displayed.

<?php
$item_number = $_GET['item_number'];
$txn_id = $_GET['tx'];
$payment_gross = $_GET['amt'];
$currency_code = $_GET['cc'];
$payment_status = $_GET['st'];
//Get product price to store into database
$sql = "SELECT * FROM products WHERE id = ".$item_number;
$resultset = mysqli_query($conn, $sql) or die("database error:". mysqli_error($conn));
$row = mysqli_fetch_assoc($resultset);
if(!empty($txn_id) && $payment_gross == $row['price']){
//Insert tansaction data into the database
mysqli_query($conn, "INSERT INTO payments(item_number,txn_id,payment_gross,currency_code,payment_status) VALUES('".$item_number."','".$txn_id."','".$payment_gross."','".$currency_code."','".$payment_status."')");
$last_insert_id = mysqli_insert_id($conn);
?>
<h1>Your payment has been successful.</h1>
<h1>Your Payment ID - <?php echo $last_insert_id; ?>.</h1>
<?php
}else{
?>
<h1>Your payment has failed.</h1>
<?php
}
?>

Cost to Implement Payment Gateway

Payment gateway

Setup fee

Fee per transaction

Monthly fee

Cryptocurrency

Countries available

PayPal

PayPal

$0

PayPal

2.9% + $0.30 per transaction

PayPal

$0 for standard, $30 for PayPal Pro

PayPal

Yes

PayPal

203 countries

Skrill

Skrill

$0

Skrill

1.45% of the amount sent

Skrill

$3

Skrill

Yes

Skrill

201 countries

Authorize

Authorize

$49

Authorize

0.10 per transaction + merchant account fee

Authorize

$20

Authorize

No

Authorize

190 countries

Stripe

Stripe

$0

Stripe

2.9% + $0.30 per transaction

Stripe

$0

Stripe

Yes

Stripe

24 countries

2Checkout

2Checkout

$0

2Checkout

2.9% + $0.30 per transaction

2Checkout

$0

2Checkout

No

2Checkout

200 countries

Adyen

Adyen

$0

Adyen

2.3% + $0.11 per transaction

Adyen

$0

Adyen

No

Adyen

12 countries

Amazon Pay

Amazon Pay

$0

Amazon Pay

2.9% + $0.30 per transaction

Amazon Pay

$12.99

Amazon Pay

No

Amazon Pay

33 countries

We hope you leave with a clear answer of how to integrate a payment gateway into a website. However, if you want to know more, contact us anytime – we always do our best to help and want to turn your wishes into reality!

Payment Gateway Integration for Your E-Commerce Website
51star1star1star1star1star