top of page
Writer's pictureCloudlene Inc.

Payment Processing with Paytm "API"

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.





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



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?


25 views0 comments

Recent Posts

See All

Bicep Overview

This article assumes that you are familiar – have heard of - with infrastructure as Code (IaC) technologies such as Terraform, Pulumi,...

Σχόλια


bottom of page