PayTm integration with ionic3

Hi ,
I was integrate paytm to my ionic application . i have some error to redirect to the paytm server.

var headers = new Headers();

headers.append("Accept", 'application/json');

headers.append('Content-Type', 'application/json' );

let postData = {











 postData, {headers:headers})
.subscribe( res =>

i was run that code i am getting below error response 

Failed to load resource: the server responded with a status of 403 (Forbidden)
(index):1 Failed to load Response for preflight does not have HTTP ok status.

vendor.js:1823 ERROR Response

how to resolve this issue , 

for PayTm you have to send the exact same variables which was passed to create the checksum.
Are you getting lost in space issue?

Yes i’m getting lost in space issue . but the api will working fine in postman. but not working in integrate to app .

getting this type of error

Failed to load resource: the server responded with a status of 403 (Forbidden)
(index):1 Failed to load Response for preflight does not have HTTP ok status.

I can pay normally if I use it.

Thank you for Your Reply. i will check .

1 Like

Is that work or not ?


I am also doing with inappbrowser, I am able to pay , but how to get the response from callback url to check whether the transaction is success or not.

You give him a callback address for the parameter, then when you start the callback, you close the inappbrowser itself, and then you handle the rest.

Thanks yuhai, it’s working now

Hi i am facing some issue while trying to integrate paytm to my app. can you share your code so that i can implement it same.
It would be very helpful to me.
Thanks and Best Regard

I am unable to load html file into inAppBrowser.,It’s rendering only base64 form string.
Please suggest me how should i handle it.
I will appreciate your suggestion.

var transferdata=“MID=xxxxxxxxxxxxxxx&”
transferdata=transferdata+“CHECKSUMHASH=”+ chcksum;
const bb = this.iab.create(“"+transferdata,"_blank”,‘location=no’)
.subscribe((ev: InAppBrowserEvent) => {
if(ev.url == “”+ordertimeStamp){
console.log("----------------payment sucess");
var txnchecksum = ‘https://xxxxxxxxxxxxxxx/TxnStatus?’;
txnchecksum=txnchecksum+“ORDER_ID=”+ordertimeStamp+"&", ‘’,’’)
.then(data => {
var myvar=setTimeout(() => {
}, 4000);
if (respdata.indexOf(“STATUS=TXN_SUCCESS”)>-1)

             if (respdata.indexOf("STATUS=TXN_FAILURE")>-1)
               //do something

     }), error => {


1 Like

Thanks for replying me.
let chcksum = checkSum.replace(/+/g, “%2B”);
not allowing me to run my app as i m getting .
Module parse failed: Error parsing regular expression: Invalid regular expression: /+/: Nothing to repeat (84:54)
You may need an appropriate loader to handle this file type.

above code is for typescript. you can check this link for this error

You turn your writing into demo and put it on git. Let me see.

Hi Naveen
Do you have any idea to integrate the paytm in ionic 3 or ionic 4, will please share the links or any documentation

can you please share you working code it will be really helpful for us to understand the process and what we doing wrong.

This helped me, thanks!

can you tell me how to generate CHECKSUMHASH key?