Skip to Content

How to Accept Payments in WordPress — A Detailed Guide

How to Accept Payments in WordPress — A Detailed Guide

Gone are the days of snail-mail invoices, telephone calls to chase late payments and waiting for checks to clear.

The digital era has truly ushered in the on-demand economy.

Customers want things now, and businesses want to be paid as fast as possible.

With the advancements in technology and the simplistic nature of WordPress (and the integrations for it), store owners can be paid instantaneously.

With the right solutions added, businesses can be paid even before accepting an order by adding a wallet function to WordPress.

Entire checkout processes can be customized, and more than one payment gateway can be used. Making the payment process as smooth as possible can lower instances of cart abandonment.

To reach that pinnacle, there are other components involved than adding a buy now button.
 

How to accept payments in WordPress

  • Secure your website with HTTP over SSL
  • Setup a Merchant account to accept debit and credit card payments
  • Choose a payment gateway that meets your needs, or,
  • Use an online payment gateway (Stripe or PayPal)
  • Install an ‘approved’ WordPress plugin from the payment gateway provider

 

The need for an SSL certificate

To accept payments online, or to capture any personal information, websites need to be secured with a Secure Sockets Layer (SSL) certificate. This is to encrypt users’ data and to prevent intruders spying.

The vast majority of WordPress hosting providers include SSL certificates in the hosting plans. All payment gateways will require your site to load with an HTTPS connection.
 

Merchant account requirements

Despite the increase of in-app payments, a vast amount of commercial transactions are still done using credit and debit cards.

These details are sensitive and should not be stored in your WordPress database.

Instead, WordPress websites need to be connected to a payment gateway or payment processor for PCI DSS (Payment Card Industry Data Security Standard) Compliance.

Some payment gateway services require merchants to have a merchant account. Others do not.

PayPal and Stripe are two examples of complete payment solutions that can be used to accept payments on websites without a merchant account.
 

Choosing a Payment Gateway or Payment Processor

There is a large number of payment gateways ranging from PayPal, Google Pay, Stripe, Amazon Pay, Authorize.net, WorldPay and many more.

Those are only the mainstream providers.

You can go further with crypto payment processors such as Coinbase or Bitpay.

Each will have different fees based on the level of risk.

For online payments, the risk is higher because the card is not physically present. Asides from the merchant account fees (usually a monthly charge), there will also be transaction fees and authorization fees.

A transaction fee is typically up to 3%. An authorization fee is usually up to 0.3%. Fees vary by provider so it will be worth researching your options.

Other things to consider are if you need a hybrid payment processor to accept online payments and in-store payments, as well as if multi-currency payments are supported, and if so, what the currency conversion fees are.
 

Ease of setting up on WordPress

Your choice of payment gateway may be limited if you do not have technical knowledge. Without a plugin with all the coding done, your theme will need JavaScript coded to connect your WordPress server to your payment gateway.

Using Google Pay as an example, you would need to create four scripts…

Load pay.js
isReadytoPay()
createButton()
loadPaymentData()

Setting up Google Pay is straightforward in the developer console, but connecting WordPress through the API requires technical knowledge or the assistance of a web developer.

The code below is only a snippet of the JS codes that would need to be added to your theme.

<script async="" src="https://pay.google.com/gp/p/js/pay.js" onload="onGooglePayLoaded()"></script>

function onGooglePayLoaded() {
const googlePayClient =
new google.payments.api.PaymentsClient({
environment: 'TEST'
});
}

isReadytoPay()

clientConfiguration ={
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [cardPaymentMethod]
};

googlePayClient.isReadytoPay(clientConfiguration)
.then(function(response) {
if(response.result) {
// add a Google Pay button
}
{).catch(function(err) {
// log error in developer console
});

googlePayClient.createButton( {
// defaults to black if default or ommitted
buttonColor:'default',
// defaults to long if omitted
buttonType:'long',
onClick: onGooglePaymentsButtonClicked
});

loadPaymentData()

const paymentDataRequest = Object.assign({},
clientConfiguration);

paymentDataRequest.transactionInfo = {
totalPriceStatus:'FINAL',
totalPrice:'123,45',
currencyCode:'USD',
};
paymentDataRequest.merchantInfo = {
merchantID:'012345678',
merchantName:'Company Name'
};

const cardPaymentMethod = {
type: 'CARD',
tokenizationSpecification: tokenizationSpec,
parameters: {
allowedCardNetworks: ['VISA','MASTERCARD','AMEX']
billingAddressRequired: true,
billing AddressParameters: {
}

The simpler method is to use a plugin to make it as easy as form filling for customers to checkout.
 

Payment processor plugins for WordPress

PayPal Payments by WooCommerce 

The PayPal Payments plugin for WooCommerce integrates the PayPal Payment Pro service to WooCommerce stores on WordPress.

This is a PayPal merchant account that integrates with WooCommerce stores. One of the key distinctions from this service in comparison to adding a standard PayPal button is that customers can check out on your site.

It gives customers more checkout options. Pay upfront with a Debit Card, use a Credit Card, or depending on your location, PayPal Credit may be available, and it supports phone-based card payments.

When integrated with WooCommerce, it can be configured to support multiple currencies.
 

Get Paid

WPGetPaid.com started out in 2017 as WP Invoicing. Within a year, they had plugins developed to integrate three payment gateways with WordPress.

Five years later, they have a library of plugins to integrate with all major payment gateways, and a suite of add-ons to tailor how you get paid.

From Cash on Delivery (CoD) to adding a wallet to your site, which would be handy for high ticket items by offering split-payment options, or even accepting deposits to secure a booking.
 

Stripe

Stripe powers billions of transactions every year, yet the vast majority of customers do not even know of Stripe being in the background.

It is like a white-label all-in-one online payment solution.

Shop on Amazon, Stripe is powering the checkout process. Using the Lyft app, Stripe is powering the payments. Same with Deliveroo, Boohoo, Salesforce, and the bulk of Shopify stores.

Where Stripe excels is with branding. The entire checkout process can be made on-brand.

Stripe can be integrated with WordPress using a verified Stripe plugin for WordPress.

If you search for Stripe in the WP plugin repository, it shows dozens of pages. Only 39 WordPress plugins (at time of writing) have been evaluated by Stripe’s engineering team for “quality, security, and utility”.

Should none of the existing solutions be the right fit, developers can use the Stripe PHP SDK to customize the checkout process and connect it to Stripe with the API.