Learn how to use Paystack easily! It is a modern service that provides entrepreneurs with an opportunity to allow their customers to make payments the right way on their websites. There are several ways to do it, and we are going to study them now. So, let's go!
Paystack is a straightforward and convenient service, that you can use to implement payment transactions function on your website. Today, we are going to find out some easy ways for you to use Paystack and give you guidelines that will show you how to integrate to the service.Shopify integration
If you want to integrate your shopify site with Paystack service, then follow the guidelines below. Note that Paystack currently supports only websites that have Naira as default currency.
First, you need to follow the link . You will be redirected to the next page, where you will need to click "Add Payment Gateway."
Then, click the "Edit" button.
Provide your public and secret keys. You can find them at .
Save your settings.
Now, your customers have an opportunity to make transactions using Paystack.WooCommerce integration
Sign in into your WordPress account following this link. . Go to "Plugins > Add New" from the menu on the left. In the search box insert "Paystack WooCommerce Payment Gateway." From the search result you will see "Paystack WooCommerce Payment Gateway," and you will have to click on the "Install Now" button. In a popup window you need to confirm the installation of the plugin. After installation, activate the it. Open the settings page for WooCommerce and click the "Checkout" tab. Click on the Paystack link from the available Checkout Options. Now you have an opportunity to configure your Paystack Payment Gateway settings.
Download the plugin zip file using this link .Sign in into your WordPress account. Click on "Plugins > Add New" from the left hand menu. Click on the "Upload" button, then "Choose File" to select the zip file from your computer. As you picked up a file, click "OK" and the "Install Now”" button. Activate the plugin. Open the settings page for WooCommerce and click the "Checkout" tab. Click on the Paystack link from the available Checkout Options, and configure the options.Plugin configuration
To configure the plugin, go to WooCommerce > Settings from the menu on the left, then click "Checkout" from the top tab. You will see Paystack as part of the available Checkout Options. Click on it to configure the payment gateway.
Enable/Disable - check the box to enable Paystack Payment Gateway.
Title – allows you to determine what your customers will see this payment option as on the checkout page.
Description - controls the message that appears under the payment fields on the checkout page. Here you can list the types of cards you accept.
Test Mode - Check to enable test mode. Test mode enables you to test payments before going live. If you ready to start receving real payment on your site, kindly uncheck this.
Test Secret Key - Enter your Test Secret Key here. Get your API keys from your Paystack account under Settings > Developer/API
Test Public Key - Enter your Test Public Key here. Get your API keys from your Paystack account under Settings > Developer/API
Live Secret Key - Enter your Live Secret Key here. Get your API keys from your Paystack account under Settings > Developer/API
Live Public Key - Enter your Live Public Key here. Get your API keys from your Paystack account under Settings > Developer/API
Click on "Save Changes" to apply them.How to use Paystack-PHP
Integrating Paystack to your website is very easy, you can perform it in just two steps:
Initialize the payment.
Verify the payment was successful.
There are two ways to integrate Paystack service:
With inline integration, your customers will see a popup window that allows them to make a transaction with the Paystack service. If you use a standard integration, your customers will be redirected to Paystack's website to make a transaction. And when they have paid, they will be redirected back to your website.
To implement Inline Integration use this sample code to setup . After payment, you should go to the second step to verify the payment was successful and also get more details of the transaction. You can do that via AJAX or redirecting to another page. The callback function is where you set the action to be performed after the user makes a payment.
For people that are not familiar with Ajax, another option would be to pass the transaction reference as a GET parameter while redirecting to another page. And on that page, you can perform verification step.
Use this sample code to initialize a transaction. The Callback url is the URL/Page Paystack would redirect to, after the user makes a payment. You can set it globally for all your integrations from your or you can set a custom callback url while initializing the payment.
For verification step, use this to verify the payment was successful before you give value to user/perform whatever necessary action should be performed after payment. Developers usually check for the wrong parameter while verifying the transaction, use the sample below to verify your transaction,
If you want to charge returning customers without them having to type their card details everytime, you can use Paystack charge auth api.
There are several options for using API to integrate Paystack service to you website. We are going to study the differences between them and how to use them.Paystack Inline
Paystack Inline offers a simple, secure and convenient payment flow for web and mobile. It can be integrated with a line of code thereby making it the easiest way to start accepting payments. It also makes it possible to start and end the payment flow on the same page, thus combating redirect fatigue.
A more easy way to load Paystack Inline is to pass the parameters as data attributes in a script tag as shown below:
Below, you can find configuration options for Paystack service:
Paystack Inline Embed is the latest addition to the stack, it offers you a feature that loads the credit card form in a set container like it is in your page.
Here are some configurations you might need for the service:
We hope this information will be useful for you, and eventually for your customers and the prosperity of your business.