#majks_code

1 messages ยท Page 1 of 1 (latest)

prime fernBOT
stuck apexBOT
#

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.

prime fernBOT
#

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

tame summit
#

Can you share the Payment Intent (pi_xxx) that you attempted to retrieve the stripe fee?

waxen geyser
#

pi_3PJVhYD0lgYOHaXN1vwLSm3V

#

But when I opened dashboard there are Fees

#

But when event happens there are no data

tame summit
#

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

Keep track of changes and upgrades to the Stripe API.

#

I'd recommend only retrieve the balance transaction after receiving charge.updated event

waxen geyser
#

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.updated that in this event we have received payment and we update order in payment completed and updated fees in our database
tame summit
waxen geyser
#

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

tame summit
#

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_method can be set to automatic: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method

Learn how to fulfill orders after a customer pays with Stripe Checkout or Stripe Payment Links.

waxen geyser
#

Thank you will try with this.

tame summit
#

No problem! Happy to help ๐Ÿ˜„

waxen geyser
#

It worked! Thank you :strongdoge: