#ramy-api-version-python

1 messages · Page 1 of 1 (latest)

winter turtleBOT
tiny notch
#

one had the charge id and the other one hasn't

#

@quiet flare ?

quiet flare
#

Hi, let me help you with this.

#

Could you provide more context please?

tiny notch
#

sure

hot barn
#

2 requests
{
"application_fee_amount": "56",
"currency": "aud",
"off_session": "True",
"payment_method": "pm_1OWBXnIfd3b13usYtjwwYwtV",
"confirm": "True",
"amount": "2800",
"payment_method_types": {
"0": "card"
}
}

{
"application_fee_amount": "56",
"currency": "aud",
"off_session": "True",
"payment_method": "pm_1OWBYKIfd3b13usYmtu8teyp",
"confirm": "True",
"amount": "2800",
"payment_method_types": {
"0": "card"
}

#

response one has charges list and other hasn't

#

why?

quiet flare
tiny notch
#

req_3WyrEH0rBRRkqH
req_yKSlhhDHIERHT4

quiet flare
#

The difference is in the Stripe API version:

  • in version 2020-08-27 Stripe provided a list of charges.
  • in version 2023-10-16 just latest_charge as ID, to speed up the request.
tiny notch
#

is it related to how the user got connected ?

#

or according to what which version is used in the payment ?

quiet flare
#

I see that in both cases it's set explicitly.

#

How are you making these calls?

tiny notch
#

i don't understand

hot barn
#

stripe.PaymentIntent.create

quiet flare
#

Are these 2 calls come from 2 different apps?

hot barn
#

no

tiny notch
#

same app

hot barn
#

same app same code

winter turtleBOT
quiet flare
#

Did you upgrade the Stripe version on the Connected account?

tiny notch
#

no - all user are still connected on the same account if this what u r asking

quiet flare
#

Something must be setting the Stripe version on the request. Could you please share the code that makes the request?

tiny notch
#

sure - min

frozen grail
#

👋 taking over as vanya needs to step away soon

Looking at the requests you shared, it seems like your code sets the API version explicitly

hot barn
#

payment_intent = stripe.PaymentIntent.create(
amount=int(chargeAmount),
currency=chargeCurrency,
payment_method=payment_method_id,
payment_method_types=['card'],
stripe_account=admin_stripe_account_id,
application_fee_amount=int(prepared_system_amount),
off_session=True,
confirm=True
)

frozen grail
#

You likely have stripe.api_version = SOME_VERSION in your code

winter turtleBOT
#

ramy-api-version-python

hot barn
#

stripe.api_version = "2020-08-27"

frozen grail
#

Yes, but the other API call was made with that line set to 2023-10-16

tiny notch
#

if we didn't add API version on direct charges - what will happen ?

frozen grail
#

If you don't set the version explicitly then the API would use account's default API version

tiny notch
#

u mean client account?

frozen grail
#

Default API version on the Platform account

tiny notch
#

sorry something i can't get :
how it is different version when the platform account is the same ?

#

how it's in some charges it is ver 2020-08-27 and other charges it's ver 2023-10-16

frozen grail
#

Based on our logs, your server side code is setting X and Y values explicitly.

#

So you must have stripe.api_version = "2020-08-27" & stripe.api_version = "2023-10-16" somewhere in your code

tiny notch
#

ok i will try to set API for them and will get back to u if anything happen

#

thank you for ur help