#Vijay Deepak
1 messages ยท Page 1 of 1 (latest)
Hi. Sounds like a network connectivity issue. Is this happening on your server, local machine, or both?
So from that same server, you're successfully making other requests to Stripe?
Not to stripe. I meant we are able to make connection to other servers.
Ah I see. Recommend running these diagnostics on your server: https://github.com/stripe/stripe-reachability
I got this result when I ran the reachability script
Seems like reachability is fine.
This was the last line it was cut off: OK: curl_https check
Odd
And that script was run on the server where you are having the above api error?
The same node/endpoint?
Yes, nothing has changed in that server. Everything was running fine until today morning.
Can you try making the same api request in that server's console using curl? https://stripe.com/docs/api/customer_portal/sessions/create?lang=curl
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
To see what happens
We tried the above curl command in our server, it works fine.
Ok so connectivity isn't the issue
Have you retried creating a billing portal session via your
.setReturnUrl(url)
.setCustomer(stripeCustId)
.build();
com.stripe.model.billingportal.Session portalSession = com.stripe.model.billingportal.Session.create(params);```
snippet? Has the issue resolved?
The issue is not resolved yet. We are seeing the same error if we retries creating a billing portal session.
Yes
The customer create API works fine (Customer customer = Customer.create(param)). The snippet that i sent you earlier where we creating a billing portal session that is the one that is failing.
Super weird
What versinon of the sdk are you using?
Also can I have a request id or your account id? Just want to check some logs
group: 'com.stripe', name: 'stripe-java', version: '20.80.0'
Customer ID: cus_Ku8IkHyJerUktt
This all implies a connection issue
Not sure why the curl command is working
If it's only not working on 1 server and all the versioning is the same, it's almost certainly connectivity
But doesn't make sense why curl works on that same IP
You're 100% certain you tried with curl on the same exact IP?
Yes, its very confusing. I just tried the curl one more time from the same server.. worked fine..
Hi ๐
I'm stepping in as @heavy jay needs to go soon
Anything you noticed from your log?
When you say "your log" what are you referring to?
I was checking their request logs to see if I picked up anything interesting
Only ones I see are paramter missing: https://dashboard.stripe.com/logs/req_IEx9mE2LxcpGcl
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Required customer
Those are from earlier today and were issued with the Java sdk
Any connection errors won't make it to us though (like the one you initially shared)
we checked logs in the stripe portal and it looks like there were errors today with the message "parameter_missing - customer".
Looks like started appearing around 7 a.m. PST.
But, from what we can see, the parameters are being sent.
Do you have a request ID I can review?
req_sdjGzcYzY6FShh
This request is passing no parameters to the API. The POST body is empty
Our logs only show connectivity issue. Maybe due to that the Post body is going empty?
That is the reason our API is returning an error
Not sure why the connectivity issue happens only for the creating billing portal session and works fine for the customer creation endpoint.
Yes that is strange. Do you have a recent example of the cusomter creatioin? Is it possible that the logging of connectivity issues is actually how the API errors are being handled?
This is an example of customer creation working fine: req_NJ1BtSs0eIQpDL. The billing poertal session immediately after that failed.
This was aslo sent with no POST body
This worked because all fields for the Customer object are optional
It looks like your integration is not passing any parameters. I can see you are using our Java client library. Can you modify your Java code to use the following syntax? https://stripe.com/docs/api/customers/create?lang=java
We are using the builder from the SDK. The following is the code snippet for it:
-
SessionCreateParams params = new SessionCreateParams.Builder() .setSuccessUrl(successUrl) .setCancelUrl(cancelUrl) .setCustomer(stripeCustId) .addPaymentMethodType(SessionCreateParams.PaymentMethodType.CARD) .setMode(SessionCreateParams.Mode.SUBSCRIPTION) .build();*
Should we be not using the builder anymore and just send the parameters by using params.put ?
You can use the builder syntax (unfortunately not all our docs use the Builder syntax).
There is an example here fo that syntax: https://stripe.com/docs/invoicing/customer?dashboard-or-api=api
We're not sure why it's failing though.. the same code works fine on our test servers