#majks_code
1 messages ยท Page 1 of 1 (latest)
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.
- majks_best-practices, 16 hours ago, 12 messages
- majks_best-practices, 18 hours ago, 42 messages
๐ 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/1243098225234284605
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Can you share the Payment Intent (pi_xxx) that you attempted to retrieve the stripe fee?
pi_3PJVhYD0lgYOHaXN1vwLSm3V
But when I opened dashboard there are Fees
But when event happens there are no data
With API version from 2024-04-10 that made in https://dashboard.stripe.com/test/logs/req_kGsnL6avOpaoUP, the underlying Payment Intent has default the capture method to automatic_async: https://docs.stripe.com/upgrades#2024-04-10
Balance transaction will only be available after charge.updated event is sent. For pi_3PJVhYD0lgYOHaXN1vwLSm3V, charge.updated event https://dashboard.stripe.com/test/events/evt_3PJVhYD0lgYOHaXN1g4e26m7 was sent on 2024-05-23 07:04:40 UTC, but you attempted to retrieve the fee before that on 2024-05-23 07:04:39: https://dashboard.stripe.com/test/logs/req_8XWnLqPxi1m57x
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'd recommend only retrieve the balance transaction after receiving charge.updated event
So there is no way to get fees in event checkout.session.completed?
I am using checkout session
checkout_session = stripe.checkout.Session.create( mode="payment", payment_method_types=["card"],
So I have 2 questions:
- is any way that I would get fees in
checkout.session.completed?
- If not can I rely on
charge.updatedthat in this event we have received payment and we update order in payment completed and updated fees in our database
Unfortunately, there is no way to retrieve fees from checkout.session.completed event.
I'd recommend checking the guide here about retrieving balance transaction after charge.updated event: https://docs.stripe.com/payments/payment-intents/asynchronous-capture
In all docs it is recomended to use checkout.session.completed for confirming payment. Can I relay on charge.updated event ? To confirm it or to put it in error/canceled state?
It is posible for me to create checkout session without automatic_async
checkout.session.* events are recommended to determine the payment status: https://docs.stripe.com/payments/checkout/fulfill-orders#delayed-notification
charge.updated event is generally recommended for Balance Transaction retrieval.
It is posible for me to create checkout session without automatic_async
Yes, this is possible.payment_intent_data.capture_methodcan be set toautomatic: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method
Thank you will try with this.
No problem! Happy to help ๐
It worked! Thank you :strongdoge: