Building the Medusa.js Paystack Integration

How Andrew Glago built a modern e-commerce payment integration for African devs

Article Feature Image

The Developer Contributor Spotlight highlights software engineers who use Paystack’s APIs to build useful tools that help others.

In this edition, we’re featuring Andrew Glago, a Software Engineer at PubGenius and the creator of the Paystack integration for Medusa.js. This tool enables African businesses to easily accept payments through their custom online stores.

In this interview, Andrew talks about how the project started at Hacktoberfest and turned into a real-world solution, the challenges of adapting global e-commerce tools for African markets, and how his integration is already helping businesses today.

Tell us a bit about yourself. Who are you, where are you based, and what do you do?

I’m Andrew Glago, a software engineer based in Accra, Ghana, working full-time at PubGenius. My day-to-day involves working as a full-stack developer on various client projects, and I’m currently focused on a CMS product designed to quickly transform documents into websites.

A unique aspect of my life is my role as an editor on Genius.com, the popular song lyric and news story database. I’ve been an editor since 2018, though I’ve been actively contributing to the platform since 2015.

That’s pretty cool! What was it like becoming an editor?

Becoming an editor at Genius is a pretty involved process. You first need to build a strong reputation on the site by making lots of high-quality contributions. After that, you go through a mentorship phase with an existing editor to learn all the best practices. Genius is fundamentally community-driven; anyone can submit lyrics and annotations. So, as an editor, I can both contribute my own insights and review others’ submissions across the site, ensuring our quality standards remain high.

My favorite part about being an editor is approving truly insightful contributions, especially annotations, and seeing that encourage contributors to do even more. We genuinely need more people contributing lyrics and knowledge for our local songs.

Awesome! Let’s talk about your work with Medusa.js. What inspired you to build a Paystack integration for it?

Medusa.js is a framework that makes it easier for developers to set up custom e-commerce stores by abstracting away much of the complexity.

The project actually started during Hacktoberfest, a global celebration of open source, when Medusa was running a hackathon. I met another developer, Femi Akinyemi, on the Medusa Discord, and we decided to collaborate. We noticed there weren’t any payment solutions for developers using Medusa to accept payments in Africa, so we saw an opportunity to fill that gap.

Image
Paystack integration on a Medusa.js site.
Shareable Takeaway
The Medusa.js Paystack integration makes it easier for African developers to build custom stores that accept local payments.

Taking on an integration project with an established framework must have come with its challenges. What was the most difficult aspect of developing this integration?

The learning curve with Medusa was quite steep. It’s a very composable platform, which can be both a blessing and a curse.

A specific challenge was figuring out how Paystack fits into Medusa’s paradigm. The existing payment plugins were geared toward Western economies with different payment methods than what we have locally. We had to figure out how to adapt Paystack’s Africa-focused payment solutions to work within Medusa’s architecture while maintaining the platform’s high standards.

Fortunately, Medusa has some of the best documentation I’ve seen in the open source world, which made the learning process much smoother.

Nice! It sounds like you had to overcome some significant technical hurdles. Were there moments during this process that felt particularly rewarding?

Seeing the first payment come through was incredibly rewarding! But there was another moment that really validated what we were building. I was speaking with someone who wanted to build a custom website to sell their course. Using Medusa’s composability, we were able to build out a backend for the merchant and connect it to their existing storefront, rather than building an entire platform from scratch.

This showed how our integration could help developers build highly custom solutions in half the time, while still getting all the out-of-the-box e-commerce features.

That’s a great example of the integration’s impact! But of course, the work doesn’t stop after the initial release. How do you maintain the project now that it’s out in the wild?

I dedicate my weekends to open source work. I use Dependabot to track dependencies and send pull requests, which helps me stay on top of necessary updates. For example, when Medusa released version 2.0, I spent time updating the plugin to support the new version. I also want to make the integration compatible with serverless Medusa in the future.

Subscribe to our monthly developer newsletter

Enter your email to receive more developer-focused news and stories from Paystack.

Subscribe →

Beyond the technical aspects, how has working on this integration impacted your personal and professional growth?

The impact has been significant. I’ve met some great people through this project. Femi, my co-creator, and I have stayed in contact since the hackathon. I’ve also built many connections through people reaching out on LinkedIn about the integration.

One of the most fulfilling aspects has been seeing businesses use our integration. For example, someone raised an issue because they were building a store for a merchant in South Africa who was selling sauces. It’s incredible to see something I built helping small businesses across Africa.

Your experience is truly inspiring. For someone reading this who might be wondering why they should contribute to open source, what advice would you give them?

I’d recommend starting during Hacktoberfest because repositories and maintainers go out of their way to make it easy for new contributors. GitHub has labels for Hacktoberfest and “good first issue” that help you find smaller issues that serve as training wheels.

It’s also a really good way to upskill. If you like your craft and want to get better at it, there aren’t many better ways than watching people who are good at what they do, and learning from them. You get to see the standards and practices applied in these projects and learn about best practices for software development.

Shareable Takeaway
Open source is a powerful way to learn, grow, and build tools that solve real-world problems.

Looking ahead, do you have any plans to expand the functionality of your integration?

Ensuring our integration continues to work seamlessly with the new version of Medusa is a priority. Outside of that, there aren’t any major new features planned at the moment, so future development will primarily be driven by updates to either Medusa or Paystack.

Can you share where people can find and connect with you?

You can find me on GitHub at a11rew, where I also maintain several other open source projects, including a Focus Mode sync app for macOS.

Thank you for sharing your journey with us and for your continued dedication to open source development. We look forward to seeing what you create next!

Join our developer community on Slack

Building or interested in open source projects with the Paystack API? Join Payslack, our developer Slack community, to share, get support, and connect with fellow developers.

Join our developer community →
Building the Medusa.js Paystack Integration - The Paystack Blog How Andrew Glago built an e-commerce payment… - The Paystack Blog