#elem103_best-practices

1 messages · Page 1 of 1 (latest)

last lichenBOT
#

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

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

timber tundra
#

Hello! do give me some time to take a look at this

timber tundra
#

You could try authorising and then capturing the payment separately.

If you are doing mode='payment'.After the payment is authorised, you would know the final amount after discount and then be able to update the application fee you are collecting on the underlying payment intent. Then you can capture the payment.

last lichenBOT
#

⛔️ Stripe developers have stepped away for a short while

Please leave your questions here, and we’ll respond as soon as we're back! If you need help urgently, you can contact Stripe support for help.

last lichenBOT
severe marten
#

Ok, I think maybe i'm not clear. It looks like the capture method is for the client and not for the intermediary that we charge against.

#

We have stripe connected accounts that we are charging for. When we charge a client, the amount charged (minus the stripe fees) is sent to the connected account. We also take a cut off this transfer by adding an application_fee_amount during checkout session. We are not trying to charge the client less. We are transferring less to the connected account.

#

From my understanding, capturing the payment separately allows us to capture less from the client and not actually send less to the connected account. Does this make sense?

sterile walrus
#

Hi there, jumping in for my colleague

#

Yes you are correct, this is about the calculation involved with application fee

#

To be clear, could you outline an example, what it is currently calculated and what do you want to achieve?

#

ie you charge your Customer $100, Stripe fee = $3.6, Amount incoming = $96.4 then you take application_fee from here

severe marten
#

That's what we are trying to achieve.

#

We already have that working. The problem is that the application fee right now is part of the checkout session and the checkout session is before discount is applied. What we really need is % application fee.

#

So let's say, customer pays $100. We create a checkout session of $100 with 10% fee ($10 application_fee_amount). Let's say we have 50% discount, then it will become $50. In this case, we want the application fee to be $5 instead of $10. How can we achieve that?

sterile walrus
#

I see, is the discounts fixed before you create the Checkout Session?