News for hackers. Stuff that matters.
Re:Payments 101 for a Developer by game_the0ry on Wednesday April 26, 2023 @12:06PM (#35715977)
Nice share. It gives me an idea...

It would be cool if there was a unified payments API interface that payment providers (paypal, cashapp, stripe, ccbill, payment cloud, segpay, epoch, whatever) would agree to use. Hopefully, users would drive adoption, and feel free to swap providers. Also, platform agnostic (apple ios, android, web, etc). I dunno, just thinking out loud.

Re:Payments 101 for a Developer by thedangler on Wednesday April 26, 2023 @12:14PM (#35716096)
There is something like this omnipay its a framework that lets any payment processor (gateway ) integrate so you can switch processors.

So a project would use omnipay and then select what processors they want their clients to be able to use. Clients bring their own API keys or OAuth.

I believe it's in PHP and Ruby.

Re:Payments 101 for a Developer by jasfi on Wednesday April 26, 2023 @12:31PM (#35716338)
Chargebee support quite a few payment processors too.

Unfortunately none of them worked for me, because PayPal (the only one usable in my country) has been unusable. One of the big reasons is because the only bank that supports them in my country can't create a usable online profile.

But even with PayPal itself, they think I haven't confirmed my email address when I have. Although I stopped getting those emails, so perhaps the situation resolved itself.

I'm going with Lemon Squeezy now.

The lesson I have learnt in this ordeal is that you need to confirm, as much as possible, that the payment provider is usable for you. Are you approved? Are payouts accepted in your country? Tick every single box you can before you write a single line of code for a specific payment provider.

Re:Payments 101 for a Developer by manojr13 on Wednesday April 26, 2023 @02:50PM (#35718299)
Yes. The devil is in the details. Small businesses should better opt for a merchant on record who can manage all such complexity.
Re:Payments 101 for a Developer by jagan120 on Wednesday April 26, 2023 @12:44PM (#35716554)
Re:Payments 101 for a Developer by koromak on Wednesday April 26, 2023 @01:10PM (#35716969)
I'd guess Stripe and PayPal are quite happy with the current vendor lock-in
Re:Payments 101 for a Developer by Nars088 on Wednesday April 26, 2023 @04:36PM (#35719607)
Yes but it is extremely risky for the business if Stripe or Paypal is its only processor. If for whatever reason your account is flagged by the processor, you wouldn't be able to accept payments
Re:Payments 101 for a Developer by kyrra on Wednesday April 26, 2023 @01:45PM (#35717459)
Building such a thing would be extremely difficult. When you start getting to the local level with banks, networks, and governments, there are all kinds of different things you have to deal with.

You have all the different forms of payment that exist (credit card, banks, prepaid, ewallets, and even cash (reference number flows where the user takes a QR code into a store or kiosk, scans it, then pays in cash)). Then the details within those flows vary greatly by country/region. Credit cards have 3DS flows, plus CIT/MIT information. Banks want to do all kinds of 2FA, regularly they want the user to be redirected to their website to complete it. And on mobile, you could redirect to a bank or ewallet's app to confirm the payment. Then beyond that, you have various risk signals that different countries want to fight fraud. Some are lax, some are extremely invasive.

Once a payment has been initiated, knowing that it is Completed/Accepted can be really complicated. Credit cards, once you have an auth, a capture is all but guaranteed, but you still have chargebacks to deal with. ACH has a fuzzy window about when it can be reversed. Various other forms of payment have anti-fraud mechanisms that allow payments to be reversed with various windows about when that can happen.

You will always have various governments come in and force new rules that don't play nicely with whatever uniform API you create. For example, the Royal Bank of India forcing all storage of credit card numbers to happen within their country's boundries (data localization). This all of a sudden may force a flow that was using credit cards just fine to now require you to use tokens in their place.

It feels like the payments space should be easier than it is, but various regulations and security/privacy measures that change by region regularly will mess with such an API.

Edit: to add some more fun examples: it's also good to understand that some payment systems in the world are still very manual. There are people with spreadsheets that generate reports. So as a processor, you can get a response from a bank where 2 numbers are transposed in a report. Or you get reports where you aren't given a transaction_id, just a date and amount and you have to figure it out (see the UK's BACS DDICA reports).

Re:Payments 101 for a Developer by game_the0ry on Thursday April 27, 2023 @08:30AM (#35727033)
My friend, do you not realize you make my case? :D
Re:Payments 101 for a Developer by kyrra on Thursday April 27, 2023 @05:51PM (#35735065)
Yeah, I think you're right.

I think you could build such an API, but there will be so many gotchyas with each special form of payment, it will be really difficult to use well. Knowing which fields to populate for a given form of payments starts getting more complicated, and dealing with the odd side-effects of each also start to multiply.

I think the processors out there (Adyen, Stripe, Worldpay, dLocal and others) do as well as they can given the ecosystem.

Re:Payments 101 for a Developer by m_sahaf on Wednesday April 26, 2023 @01:55PM (#35717597)
Bolt has an open source Go package that tries to do that: https://github.com/BoltApp/sleet
Re:Payments 101 for a Developer by bndw on Wednesday April 26, 2023 @02:12PM (#35717823)
There is, it's called the Bitcoin Lightning Network.
Re:Payments 101 for a Developer by thunkshift1 on Wednesday April 26, 2023 @02:21PM (#35717938)
It exists in India; it is built and works pretty well. Its called ‘UPI’ Unified Payments Interface
Re:Payments 101 for a Developer by manojr13 on Wednesday April 26, 2023 @02:46PM (#35718242)
Fednow has the potential to create a similar UPI like impact on US
Re:Payments 101 for a Developer by rodolphoarruda on Wednesday April 26, 2023 @02:35PM (#35718107)
I had this idea once for a Wordpress plugin for Woocommerce websites. A plugin that would abstract all providers APIs to Woocommerce. Paid versions of the plugin would allow the merchant to work with several providers in parallel in order to reduce transaction fees (increasing the operational margin then).
Re:Payments 101 for a Developer by dzikimarian on Wednesday April 26, 2023 @02:43PM (#35718202)
https://www.w3.org/TR/payment-request/

On paper it looks kinda nice. I've seen some discussion about implementing it from the payment method perspective.

Problem is that Google would be massively privileged, as browser orchestrates the process and payment methods aren't necessarily looking for the fair compromise either.

Re:Payments 101 for a Developer by Nars088 on Wednesday April 26, 2023 @04:46PM (#35719760)
What if network tokenization becomes more mainstream? If that happens browsers would't be able to vault users' card details
Re:Payments 101 for a Developer by dzikimarian on Wednesday April 26, 2023 @06:06PM (#35720654)
I'm not sure if I fully understand your point. In this solution browser is not expected to vault card. It should just be intermediary between payment methods and payment gateways (of course saving card inside browser can be one of the payment methods).

Also depends what do you mean by more mainstream. Google Pay and Apple Pay both support tokenization. So do many other payment methods - I would say that it's mainstream. Next step would be refusing plain cards at all.

Google Pay is everything that Google needs for Chrome to have full solution.

Re:Payments 101 for a Developer by manojr13 on Wednesday April 26, 2023 @02:43PM (#35718205)
That would be a payments switch like https://hyperswitch.io/
Re:Payments 101 for a Developer by simpsond on Wednesday April 26, 2023 @06:32PM (#35720890)
That sounds like a protocol. It would be nice. Someone got downvoted for mentioning Bitcoin, but blockchains are protocols capable of transferring value.
Re:Payments 101 for a Developer by no_wizard on Wednesday April 26, 2023 @06:47PM (#35721002)
Honestly this was their initial promise when the community was super niche, it was two things:

- Normalized money transfers independent of the regular financial system

- Reducing currency interchange fees

Bitcoin was suppose to be this electronic ledger store for valuation to facilitate these things, as I recall.

Really got away from itself

Re:Payments 101 for a Developer by albybisy on Thursday April 27, 2023 @03:20PM (#35733235)
Stellar could be this open-network/protocol for transferring value. I don't see a lot of developers talking about it, but it's really really a good tool for this use case and i think it will be :)
Re:Payments 101 for a Developer by scarface74 on Wednesday April 26, 2023 @07:39PM (#35721403)
There is for the platform.

https://developer.mozilla.org/en-US/docs/Web/API/Payment_Req...

It works on Safari/iOS/MacOS and Chrome/Android (but weirdly enough, Firefox doesn’t support it).

Re:Payments 101 for a Developer by alexanderscott on Wednesday April 26, 2023 @09:23PM (#35722109)
kind of like spreedly https://www.spreedly.com/

API + unified card tokenization