#loaderchips_code

1 messages ยท Page 1 of 1 (latest)

frail flumeBOT
wary archBOT
#

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.

frail flumeBOT
#

๐Ÿ‘‹ 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/1269971769163386880

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

subtle pebble
#

Hi, let me help you with this.

#

What do you mean by "a header that has since been removed"?

random crater
#

earlier our code was like this -- if @embedded
Stripe.api_version = "2022-11-15; embedded_checkout_beta=v1"
session_params.merge!(ui_mode: 'embedded')
session_params.delete :success_url
session_params.delete :cancel_url
end

#

as opposed to the current version
if @embedded
session_params.merge!(ui_mode: 'embedded')
session_params.merge!(redirect_on_completion: 'never')
session_params.delete :success_url
session_params.delete :cancel_url
end

#

we have double checked the deployment

#

this header is not deployed anymore

sage mica
#

What's the req_xxx ID that fails? Will be in the response headers or Dashboard

random crater
#

looking

#

i cant seem to find it. will it be in the connected account's log

#

or the platform account log

sage mica
#

Depends on the type of Connect payments you're doing

#

If direct, connected account

#

I suspect once you find this request log you'll see that the beta version is still set in the headers

random crater
#

these are all the logs.

#

but i dont these is the correct place

#

if i repeat the request

sage mica
#

What's the acct_xxx ID?

random crater
#

acct_1Pjm1cPNHMm0c6Hz

#

this is the connected account id

sage mica
# random crater

You can see the API version is still sret in that request for example...

random crater
#

this is our account id acct_1KmI8jAY9OACmYiw

#

quick question. is the the Stripe object a singleton

#

so if we set the API-version in some other part of the app, it will get set statically to that

#

can you tell me what the latest API version is. let us explicitly set that during the request

sage mica
#

If you're using the same Stripe instance to make all requests, yes

#

I'm looking through our logs for the guilty request(s). Looks like there's been ~10 examples of this error today

random crater
#

yes that sounds accurate

#

this is the problematic code at a different part of codebase

#

it sets it to if @embedded
Stripe.api_version = "2022-11-15; embedded_checkout_beta=v1"
session_params.merge!(ui_mode: 'embedded')
session_params.delete :success_url
session_params.delete :cancel_url
end

sage mica
#

I actually don't think there's any public/dev facing logs here as it was rejected at the initial API layer

random crater
#

and that gets carried over to where it should not

sage mica
#

Basically, you need to omit that header everywhere โ€“ it's entirely deprecated now and redundant

random crater
#

if we remove these lines, 1. what will the default API version 2. will that automatically take effect?

#

even after removing these lines, the cached value on our servers will still be Stripe.api_version = "2022-11-15; embedded_checkout_beta=v1"

sage mica
#

It'll default to either the apiVersion you set when you initialised Stripe client, or if that's not passed the account default

sage mica
random crater
#

for a ruby server whats the way to use the latest stripe api? upgrade to the latest gem?

sage mica
#

I don't understand what you're asking me. Why do you need to update your client?

random crater
#

ok let me put my question clearly. How to set the apiVersion? Stripe.api_version = xxxx ? also whats the latest value of xxxx i can set it to

sage mica
#

Keep track of changes and upgrades to the Stripe API.

GitHub

Ruby library for the Stripe API. . Contribute to stripe/stripe-ruby development by creating an account on GitHub.

random crater
#

ok perfect. that helps. let us try that

sage mica
#

acct_1Pjm1cPNHMm0c6Hz is on 2024-06-20 (latest)

#

(can find that info in your Dashboard)

random crater
#

ok we are through. u should be able to confirm in your internal logs. rebooted all servers and removed all references to Stripe.api_version = xxxx from our code.

#

thanks for your help