#mathieu-canva - Java SDK Issues
1 messages ยท Page 1 of 1 (latest)
Hello! Are you using the latest version of the SDK? Can you share specific errors/code?
Can you give me the ID of a Payment Method where you're seeing type set to null?
Let me try to get that for you
cus_LNMIMJQGHOhddE
We have tried 3 times to create a setup intent on that customer
That's a Customer object, not a Payment Method ID.
the dashboard shows type = card but the SDK return null value
Yes but I am guessing you are able to look at the setup intent attempts for that customer? thanks
Can you see this request? https://dashboard.stripe.com/logs/req_nXDtJWAPLeSKAV
Yes
That response shows the type is not null. Can you share the code that's showing the type as null?
I have DMs disabled. Are you comfortable sharing the code here in public?
java.lang.NullPointerException: null
at com.xxx.stripe.Mapper.mapPaymentMethodType(Mapper.java:431)
at com.xxx.stripe.Mapper.mapPaymentMethod(Mapper.java:352)
at com.xxx.stripe.ApiStripeClient.createPaymentMethod(ApiStripeClient.jav
The PaymentMethod object in the function param is the Stripe SDK object
callinggetType() returns null for the above request
Thanks, let me investigate, hang on...
If you log paymentMethod when this happens what do you see there?
We don't have logs atm for these
Is this something you can reproduce on demand?
Can you show me the code where paymentMethod is created?
Sure
To clarify, I meant the code where the paymentMethod variable is populated, not where the Payment Method itself is actually created. Realized that wasn't clear, sorry. ๐
Can I see the code?
My Java is really rusty, but it looks like you're forcing the response from the API into the PaymentMethod class regardless of it it fails or succeeds, correct? There are several failed Payment method creation requests on your account, like this one for example: https://dashboard.stripe.com/logs/req_CBaO90iHT7pK2t
If that code received one of these failed responses could that explain what you're seeing?