#kyleruban

1 messages · Page 1 of 1 (latest)

real bisonBOT
glad thunder
#

This is the response i am getting in my frontend

cursive jetty
#

It doesn't look like a payment method is involved at that point when you are creating the payment intent

#

Can you tell me more about what you are trying to do here? Get the PM ID after the payment has been made?

glad thunder
#

I am trying to refund a customer with the click of a button in the frontend. This refund comes after the order is placed. I am trying to save the paymentintentid to my order object that I have. I am trying to save it to that object so i can use that paymentintentid to refund the customer with this code

#

I meant to say paymentintentid not payment method id

#

I just need the payment intent id in my frontend after the create-payment-intent route is hit

#

How can i get this payment intent id to return so it is readable in the frontend

cursive jetty
#

It looks like the code you initially provided is already returning that ID. Those IDs should be of the form (pi_123) is it not functioning as you expect?

glad thunder
#

Look at the 2nd screenshot

#

It is not returning a readble version

#

how can i make this readable

cursive jetty
#

What do you mean by readable?

glad thunder
#

So i can use see/use the payment intent

#

Look at the screenshot

#

There is no payment intent id in that

#

Idk what the right wayto say it is

#

I need that paymentintentid to return thats the most simple way i can explain it

cursive jetty
#

Have you expanded the "Response" from that?

#

That should be where the body that is returned to you is shown

#

Based on your first screenshot, that should be what contains the ID

glad thunder
#

Is there a reason it returns like that instead of giving me the value

cursive jetty
#

Is that the developer console in your browser?

glad thunder
#

Yes

cursive jetty
#

Then I think that is just because of how you are printing it out. The data is likely still there you just need to figure out how to access it in your js code

glad thunder
#

I think it is an issue with how its being returned in c#

cursive jetty
#

Hard to say, you'll need to inspect what you are sending and receiving on both ends to make sure you are send the ID to yourself in the expected format