top of page
Search

Payment Processing with Paytm "API"

  • Writer: Azurians.us
    Azurians.us
  • Oct 10, 2022
  • 1 min read

We have to integrate Paytm into our app for payments. Now, Paytm API doesn't follow any frigging REST best practices, right from treating your parameters as JSON and conversely not following any of the JavaScript property naming conventions to returning proper status codes. It expects a callback URL & since I didn't want to deploy to Azure (may be I should have... more on this later), I had to expose a Test API locally just to complete my local testing and freeze the code. Little did I know I was opening a Pandora's box. Read on.

ree

Here's the Postman request in its entirety (from Postman Console):


ree

Not yet found a solution for this issue. Working with Paytm folks. Will post the result subsequently.

My pet peeves are highlighted of the abomination that's the Paytm "API".

  • Setting Cookie from an API might be a good idea for tracking purposes. Like usage tracking or workflow tracking & tracing. I'm pretty sure this doesn't seem to be any of that

  • Request body is all caps. May be it's case insensitive. The _ are still unforgivable.

  • I prefer to post application/JSON

Biggest of all:

  • Returns OK!!!!

  • Returns HTML that there're errors! Are they expecting the programmer to parse this HTML in code?

 
 
 

Recent Posts

See All

Comments


bottom of page