So this question isn't about integrating an existing payment gateway into my site. This is more of a architectural question.
I want to build a system similar to Paypal. Now I understand that Paypal offers a lot of features under the roof and I can't implement all of them at once. I want to implement the core functionality of Paypal and other such services.
So my question is (rather discussion is) around how would one go about building such a system. Some points to discuss:
- Allow users to securely store and process their payments How does Paypal handle the transactions?
- Handle payments through existing banks. I am guessing that I would need access to local bank protocols to get this.
- Where I can find documentation of paypal or any other payment gateway to get the idea of its core functionality
Thoughts?
If you want to directly integrate with banks, you want to become a payment processor. This is quite hard to achieve (especially on the compliance side) and the market is dominated by a few giants (First Data Corp., Total System Services Inc. (TSYS), Vantiv Inc., Global Payments Inc. and Heartland Payment Systems Inc.).
A payment gateway however is a system that accepts card payments, and offers value added services such as recurring payments. Gateways (unless they are a processor themselves) most often delegate the actual processing of the cards to a payment processor.
Becoming a gateway is easier and you can even partner with ISOs which will provide you with white-labeled solutions (e.g. Intrix). You can also take a look at Kill Bill for an example of an open-source payment gateway.
Regarding security, if you want to minimize PCI compliance, you can delegate the actual storage of the card to online vaults.