#ek1338_code
1 messages ยท Page 1 of 1 (latest)
๐ 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/1295823021977763911
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- ek1338_code, 23 hours ago, 4 messages
Hello
Since this is a beta, I doubt the SDK has built in support for this.
You'd want to follow the steps here - https://github.com/stripe/stripe-java?tab=readme-ov-file#how-to-use-undocumented-parameters-and-properties
ah, thnx! So then i was on the right track.
But how exactly do I translate that one in case of permissions.update.shipping_detailsthen? I don't quite get the examples.
I have tried putExtraParam("permissions[update[shipping_details]]", "server_only") but also does not work
What error do you get with that format?
com.stripe.exception.InvalidRequestException: Received unknown pa
I get this error with both formats
My stripe-java is on latest 27.2.0-beta.2 btw
Gotcha. Let me check with a colleague
Try .putExtraParam("permissions[update][shipping_details]", "server_only")
well instead of true you'd set server_only
Amazing, thx! One thing i also saw in tutorial is that for Node the beta version is set explixcitely (screenshot) https://docs.stripe.com/payments/checkout/custom-shipping-options
According to https://docs.stripe.com/sdks/set-version this should not be set explicitly for Java
Unfortunately i get the same error with that
Also with server_only isntead of true
Java SDK has a pinned API version which you can override per request - https://github.com/stripe/stripe-java?tab=readme-ov-file#per-request-configuration
Can you share a failed request ID? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Ah there is more of the error! Nice
Received unknown parameter: permissions (Hint: In order to access this beta feature, you must explicitly specify which version of the beta you want, by passing an HTTP header "Stripe-Version: 2024-09-30.acacia;checkout_server_update_beta=v1".)
But it says I am using latest API version
But I still don't know where to set this version in Java. Here it says https://github.com/stripe/stripe-java?tab=readme-ov-file#beta-sdks
Stripe.addBetaVersion("feature_beta", "v3");.
But this addBetaVersion is not even available in my IDE
try using it anyway
Ouh, I am dumb, it says to set the HTTP Header, let me set that and get back to you then
NP! ๐
Ah okay, it seems like the Stripe.addBetaVersion is indeed supposed to set this HTTP Header. However, I don't have this method. If I try to call it, my compiler crashes, because it does not know it.
But one other interesting information I've found is:
(screenshots)
So it seems to point to the latest version anywyas...but probably it does still not really send out the header because this is what I see in the logs
I think you're missing the function because you're on a beta SDK version already
can you try switching to a non-Beta SDK version?
oh wait
nvm
Beta version headers can only be set in beta versions of the library.
Try reinstalling the SDK?
Ok will do! ๐
Have you imported Stripe package?
you can't set addBetaVersion on StripeClient
I just installed the same SDK version and I'm able to pass the header
you probably need following
import com.stripe.Stripe;
...
Stripe.addBetaVersion("checkout_server_update_beta", "v1");
Interesting! Yes, my import is the same. I am even setting the apiVersion on Stripe . That one my IDE recognizes. But somehow not the beta stuff
and you also use 27.2.0-beta.2 right?
Ah, right, just saw it in the screenshot
Ah, works! Somehow my IDE was indeed not synced somehow. Thanks very much for the great support!