#scott_checkout-applicationfee

1 messages ¡ Page 1 of 1 (latest)

north socketBOT
#

👋 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/1228118520479350874

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

glad fableBOT
hallow gazelle
#

scott_checkout-applicationfee

#

@grave ridge I assume you have real code that is failing with an exact req_123 id that shows the error, if so can you share that?
If you don't, can you try to give me a bit more context about the issue?

grave ridge
#

So I dont due to try and catch methods, let me get the error from that

#
Stripe.StripeException: 'Some of the parameters you provided (application_fee_amount) cannot be used when modifying a PaymentIntent that was created by Checkout. You can try again without those parameters.'
hallow gazelle
#

yeah that message is useful but what I really want is the exact request id req_123

#

Also I would like to see an example for ApplePay since you said it works

grave ridge
#

I have this: evt_3P4WmzBHoAmxvHT40oxXL4RR

#

Can;t see the req_

hallow gazelle
#

So okay, updating the application_fee_amount of a PaymentIntent associated with a Checkout Session fails. That I would expect to always error, whether a QR code or a card.
Can you give me an example of a real payment where it worked?

grave ridge
#

Only building the product at the moment, so testing the updating of application fees. Instead of creating a session checkout, could I add a card input field and update a created charge instead?

hallow gazelle
#

I don't really know what those words mean

#

Let's take a small step back: why are you changing the ApplicationFee exactly?

grave ridge
#

To cover stripe fees using destination charges

hallow gazelle
#

Gotcha, sadly this isn't really compatible with Checkout. You can't just change that amount this way. Can you try in Test mode when you capture instead and see if that works?

#

okay I tried and it doesn't work. So yeah your approach will unfortunately not be compatible with Checkout

grave ridge
#

Would it be compatible using a payment element?

hallow gazelle
#

ah wait no it does work on capture, I tested the wrong script

#

so yeah instead of calling the Update PaymentIntent API to change the application_fee_amount, you can pass that value when you call the Capture PaymentIntent API

grave ridge
#

Ahh perfect! I will give this a try in the morning, I must attend to a family matter now. Thank you for your help!

hallow gazelle
#

Have a good night!

grave ridge
#

So basically replace Update Payment Intent web hook with Capture Payment Intent. If you have a code snippet to share that would be great. Good night also!