How can I make a payment integration application?

Question:
Hello friends.
I have just joined you. As a developer. I want to integrate a payment system into Wix sites.

How can I do this from scratch?
There is an API for the payment system and I will need to write the application from scratch.

I am waiting for your feedback on the subject.

Product:
Payment systems

What are you trying to achieve:
I want to create a payment system for Wix from scratch and publish it for free via the Wix app.

Are you looking to integrate a payment gateway into a single site, or are you looking to offer a payment gateway to multiple sites?