Murewa Writes

Murewa Writes

Payment Service Integration- 200 countries covered

Payment Service Integration- 200 countries covered

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article

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

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

  1. It is easy to integrate.
  2. It supports various business models.
  3. It provides customer support.
  4. No set-up fees.
  5. You can set up recurring payments.

Cons

  1. It does not support cross-currency transactions.
  2. Transaction settlement is T+1 (the day after the transaction). Settlement only occurs during the weekdays.
// 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})
})

image.png

rm.png

PayPal

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

  1. It is easy to integrate.
  2. It supports various business models.
  3. No set-up fees.
  4. It offers its own credit card through Synchrony Bank. Approved applicants are supplied with MasterCards branded with the PayPal name.
  5. Cross-currency transactions are supported.
  6. You can create and send invoices right through your account.

Cons

  1. Some transaction settlements are not real-time; differs between countries
  2. PayPal can freeze accounts without warning. PayPal’s algorithm can sometimes detect suspicious behaviours in your account. And when that happens, PayPal can automatically freeze your account, along with the funds in the account.
  3. There are hefty fees for chargebacks.
  4. PayPal's Seller Protection policies do not cover digital goods.
// 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})
})

Response.png

Checkout.png

Checkout2.png

eWay

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

  1. Built-in fraud prevention tool
  2. Approved merchants don’t need a merchant account
  3. No set-up fees
  4. Transactions are risk-rated in real-time via the Beagle tool (a free plan)
  5. APIs are secure and robust, thus eWay can be integrated with almost any website on the planet.

Cons

  1. Their built-in fraud prevention tool has to be manually activated from your merchant account.
  2. Only merchants with bank accounts based in Australia, New Zealand, Singapore, Hong Kong, Malaysia, and the UK can use eWay to receive payments.
// 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})
})

Response.png

Contribution

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.

Conclusion

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.

Resources

  1. Paystack
  2. Top 6 Payment Gateways for Online Businesses in Australia
  3. PayPal
  4. PayPal pros and cons

If you like this article, feel free to comment and share. You can also reach out to me on Twitter | LinkedIn | Github

Ciao👋🏼

 
Share this