Live data from Hacker News

Where Banking APIs Fall Short

blog.svapnil.com

11–12 of 12 posts

Re: Where Banking APIs Fall Short

#11
post #9
post #7

Differences between files and REST apis: - files get persisted to disk by default. Usually we don't save every rest result to disk (though obviously, you could) - files tend not to be processed at request time, but rather the directory acts as a queue. Usually with rest, we try to process things at request time until stuff gets too slow. Files always decouple - multiple transports are the norm: SFTP, SMTP, etc. doesn…

Thanks for sharing habitue It's true that REST APIs operate under the assumption of processing at request time, while not the case with files. That's what makes Bank REST APIs so tricky - processing doesn't ever actually occur at request time. There are so many crazy formats that are supported. Simpler is better imo

> That's what makes Bank REST APIs so tricky - processing doesn't ever actually occur at request time.

HTTP has provisions to enable async semantics between the client and the server. I would always advocate for teams to return 202 Accepted responses with a Location header containing the absolute or relative path to an endpoint that can be interrogated for status of the underlying async operation. This can work fine for lower-scale services (or even higher scale services with rate limits enforced at gateway). You POST'd a payment. You get 202 Accepted with some Location value like (simplified) `/payments/` for which GET can be used to retrieve current status (e.g. pending, failed, committed, etc).

If a polling model is not desirable you can also use webhooks and inform the caller whenever a given task is finished.

Both of these strategies work fairly well in practice in my experience. However, I Must agree that simply dropping a big file off at an sFTP share and moving on with life is certainly "easier" from the client perspective. But...do you then roll your own mechanism for checking status? Why not just use HTTP semantics that exist already?

Re: Where Banking APIs Fall Short

#12
post #10

Batch files have been used forever (since mainframes), and I get suspicious when someone implies that APIs are the “normal” way to do things. It makes me think they don’t have enough experience outside of the app development bubble. Files definitely have limitations (they’re almost always a single table of data—it’s hard to do data structures), and that seems to be driven by the need for someone in the chain the be a…

> that seems to be driven by the need for someone in the chain the be able to open it in Excel.

This is key. I know from experience that the ability to fall back to emailing CSVs around and having operations folks manually process them in Excel is required way more often than your average tech oriented person would ever expect. Plus a lot of processes that might appear to be automated at banks turn out to have someone doing a ton of manual work as part of their daily process. Things gradually and haphazardly eventually get automated but don’t necessarily start that way. Banking seems to oscillate between strict standards with robust technology and random tasks developed when a specific need arose only to never change for long periods of time.

Post reply on HN