#vrk18_code

1 messages ¡ Page 1 of 1 (latest)

quiet cedarBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1255396672150704165

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

fiery wolf
#

Hi there, have you tried removing the trailing slash? (i.e., /) ?

slow pendant
#

Is there any trailing slash Stripe.PaymentMethod method = new PaymentMethodService().Get(
PaymentIntent.PaymentMethodId );

fiery wolf
#

Are you using the latest StripeJava SDK?

#

And what's the value of PaymentIntent.PaymentMethodId ? is it null?

slow pendant
#

No pm_1PVnX8HvbngkCFktagigOPNV

fiery wolf
quiet cedarBOT
fiery wolf
#

And can you add a log in your code to make sure PaymentIntent.PaymentMethodId isn't null?

slow pendant
#

req_AwdP9SSzPz8TRW

#

I am checking the log as well, it is not null

fiery wolf
#

Looks like the request is sucessful

slow pendant
#

But I am getting this error in our log file

balmy pumice
#

To clarify, are you trying to retrieve a Customer's PaymentMethod?

slow pendant
#

I need the PaymentMethod type of the payment

balmy pumice
#

okay, i'm a bit confused as to why you're handling it the way you are. The PaymentIntent for which this PaymentMethod was initially created for has failed. Assuming you want to know what type the PaymentMethod was initially, you can see that from the PaymentIntent last_payment_error.payment_method.type

fiery wolf
#

Can you check your local log and see if the timestamp matches req_AwdP9SSzPz8TRW ?

slow pendant
#

I am sorry for late reply. I am getting that paymentIntentId when the transfer.reveresed webhook happens. I need the paymentMethod type for that particular payment whether it is failed or not

fiery wolf
#

What's the event ID?

slow pendant
#

tr_3PVnWhHvbngkCFkt1M8jo3Fm

fiery wolf
#

I don't think a tranfer object has a payment_method.

slow pendant
#

I am getting the charge from it and then paymentIntent and then paymentMethod