Payment Service Integration- 200 countries covered

I am a software developer and project manager; passionate about solving problems through IT.
Search for a command to run...

I am a software developer and project manager; passionate about solving problems through IT.
No comments yet. Be the first to comment.
The realm of Brain-Computer Interfaces (BCIs) is rapidly evolving, promising to revolutionize human-computer interaction. From medical applications like restoring mobility and communication to entertainment and cognitive enhancement, BCIs are poised ...
If you’re into Technical Writing or a member of any tech community, you’ve probably heard of the buzzword “DevRel.” It’s strange and confusing how so many job roles have been introduced into the world during this information age, and even confusing t...
Web scraping is an automatic method to obtain large amounts of data from websites. The data is largely unstructured and can be further refined. In this article, we will be testing the desktop application Scrape Any Website as an exercise for the HNGi...
Java is a multi-platform, object-oriented, and network-centric language. Spring Boot is an open-source Java-based framework used to create a microservice. It provides a good platform for Java developers to develop stand-alone and production-grade spr...
Going straight to coding without a ‘definite’ idea of what your app should look and feel like is very risky and can lead to unnecessary rework. It’s therefore necessary to plan a roadmap or process flow. This does not mean you have to have it all pla...
Hope I didn't give you a scare with 200 countries. Whoop! Don't worry, you're safe.
Handling payments for goods and services rendered back in the days was a very long and tedious process, prone to errors and time-consuming. Queuing at the bank or chasing customers to receive money is a job for the strong-minded and 'stress-tolerant'. As technology evolved over the years, the financial sector also joined the ride. Individuals and corporates can send and receive money from the comfort of their homes thus making life easier for everyone.
Payment service refers to any service provided by a financial institution to allow one person or organization to pay another for a product or service. In this article, we'll be looking at 3 payment service providers who operate in about 200 countries.
Code snipped will be shared however the full code can be found here.
Paystack was founded in 2015 by 2 Nigerians but acquired by Stripe in October 2020. It provides online payment facilities to merchants and others by way of an API and a few lines of code. It supports the B2B and B2C business models, and thus a wide range of businesses. It currently has over 60,000 businesses using its services.
Paystack supports payment using debit cards, bank transfer, USSD, mobile money and visa QR. It currently operates in Nigeria, Ghana and South Africa, supporting the following currencies: NGN, USD, GH₵ and ZAR.
Pros
Cons
// Initialise transaction
app.post('/transaction', async(req, res)=>{
const paymentData = {
email:'johndoe@gmail.com',
amount:10000, // In kobo
reference: `ABDC-${Date.now()}`,
metadata: {
custom_fields: [
{
full_name: 'John Doe',
}
]
}
}
const response = await axios.post('/transaction/initialize', { ...paymentData });
const result = response.data.data
return res.json({result})
})


Paypal is an electronic commerce company that facilitates payments between parties through online transfers. Users create an account on its platform, which is connected to their credit card or checking account. Users can send or receive payments to and from other PayPal accounts online or through the company's app.
PayPal offers payment services and solutions for both personal consumers and businesses. The company allows personal consumers to shop, make payments, and transfer money with relative ease. Users need an email address to sign up for an account and must provide a credit card, debit card, or bank account to complete the setup.
PayPal verifies all information to make sure the person setting up the account is the rightful owner before the service can be used. lt is available in over 200 countries and regions.
Pros
Cons
// create order
app.post('/order', async(req, res)=>{
const paymentData = {
intent: "CAPTURE", // CAPTURE or AUTHORIZE
purchase_units: [
{
amount: {
currency_code: "USD",
value: "100.00"
}
}
]
}
const response = await axios.post('/v2/checkout/orders', { ...paymentData }, {...headers});
const result = response.data
return res.json({result})
})



eWay was launched in 1998. It is an omnichannel payment provider. The company processes secure credit card payments for merchants and works through eCommerce.
eWAY processes payments for over 26,000 businesses.
Supported platforms include Magento, Shopify, WooCommerce, BigCommerce, WP e-commerce, etc.
Pros
Cons
// charge token customer
app.post('/transaction', async(req, res)=>{
const paymentData = {
"Customer": {
"TokenCustomerID": 917758625852
},
"Payment": {
"TotalAmount": 1000
},
"TransactionType": "Recurring"
}
const response = await client.createTransaction(rapid.Enum.Method.DIRECT, paymentData);
const result = response.attributes;
return res.json({result})
})

If you notice a bug or would like to contribute, feel free to reach out to me or check out the Contribution section of the repo.
Payment service providers have made life easier for persons to conduct local and international businesses and receive payment. Now you have no excuse for not starting your business. Go ahead and practise what we've covered in this article, or explore from the hundreds of PSPs that exist.
Note All information is at the date of this publication (December 2020) as is subject to review with innovations from the various PSPs.
If you like this article, feel free to comment and share. You can also reach out to me on Twitter | LinkedIn | Github
Ciao👋🏼