#krutarth_capture-method
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/1230925592929501234
đ 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.
- krutarth_code, 1 day ago, 12 messages
Do you have an example Payment Intent ID where you're getting a null balance transaction?
yes just a second, i'll provide.
pi_3P7JfGEOKGXnJtbn06TOsPzm
Now it has the value for balance transaction
but this happened for a brief period where the payment intent status was successful but the payment_intent.latest_charge.balance_transaction came to be null
and i have not faced this issue for months.
Did you recently update the version of stripe-python you're using? Bsaed on that Payment Intent you seem to be using version 9.2.0 which is pinned to API version 2024-04-10. There were some major changes with that API version - the relevant one being that capture_method default to automatic_async on Payment Intents (see https://docs.stripe.com/upgrades#2024-04-10)
This is why you're seeing a null balance transaction after your payment intent was successful
With automatic_async we populate the balance transaction asynchronously - you can see the charge was updated to have it later: https://dashboard.stripe.com/events/evt_3P7JfGEOKGXnJtbn0r3GZHv5
how can i change capture method to sync instead of automatic async?
You can pass capture_method: automatic when you create the Payment Method
krutarth_capture-method
Alright and what version of stripe-python should i use if i don't want to make any changes to the code?
7.11.0?
No you'd need to go back to 6.8.0 sine I think you were previously using 6.2.0 which is pinned to API Version 2023-08-16. It's not really about the stripe-python version though - it's more about the API version. Based on your logs you were using version 6.2.0 of the stripe-python SDK, which is pinned to API version 2023-08-16 so you should be able to continue using 9.2.0 of stripe-python as long as you specifically set the API version to 2023-08-16 (see https://docs.stripe.com/api/versioning)