#ndbtss_api

1 messages ¡ Page 1 of 1 (latest)

keen sparrowBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1443902182020747275

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

dim bolt
#

hi there!

#

Stripe doesn't store the response of GET requests

#

so you would need to redo the request, and save the response on your end

steel solar
#

i cant
cause something really wierd appeard in my logs
i have a cus with default pm that pays every month from my backend
But i saw logs and one week ago, i got an error that the user dosent have default pm

dim bolt
#

can you share the Customer ID (cus_xxx)?

steel solar
#

and nobody deleted the pm (and there is no log about this)

#

yes

#

cus_Q8k4cfUH0aUFOX

#

the error is from Nov 20

#

around 6 am

dim bolt
#

this customer does have a default payment method set.

#

what exactly is ther error you got? can you share the relevant ID?

steel solar
#

no its an error from my code after recieving paymentMethods :
customer.setDefaultPaymentMethodId(customerStripe.getInvoiceSettings().getDefaultPaymentMethod());
(customer is mine - customerStripe is the cus_)
i recieved null fromn this

#

that means that this line
customerStripe.getInvoiceSettings().getDefaultPaymentMethod()
returned null althrough the users has a default pm in his settings

#

Customer customerStripe = Customer.retrieve(customer.getCustomerId());

dim bolt
#

can you try to make a GET request on the customer now and paste the response here? from what I can see, the customer always had a default payment method (and also currently has one).

steel solar
#

the customerStripe is from Stripe API directly

#

yes i can

#

just a second

#

req_QToXeGtAagZt20

#

but there is no response from GET

#

what can i do?

dim bolt
#

when you make a GET request with your code, you get back the full response