#mymo-application-fees

1 messages · Page 1 of 1 (latest)

fading talon
#

Can you clarify - are you trying to add the application fee AFTER the charge/payment has already been successful? Is there a reason you're not taking it at creation time?

austere yew
#

I'm actually at how to be able to charge a fee for every transaction, so yes, before payment is successful. I'm looking at the documentation and can't figure out how to do it.

fading talon
austere yew
#

I did! But I can't figure out how to use it and esp

#

Especially where to put it *

fading talon
#

What does your code for creating a Direct charge look like right now?

austere yew
#

fee will be calculated as a % of the total amount

fading talon
#

So it looks like you're already taking an application fee - is something about this not working as you expect?

austere yew
#

I haven't run it yet. I was wondering where to put it.. That's why I'm asking about webhooks? 🙂

#

Or is it somewhere else to put it?

#

If ever it can help: we are building this code as a plugin we will use on our wordpress website (using woocommerce)

fading talon
#

No, you've already got it - all you need is to add application_fee_amount when you create the Payment Intent, which you've already done

austere yew
#

So this code will just override the Stripe initial paymentIntent creation that exists already within our website..?

fading talon
#

Can you clarify what you mean by that? Are you creating two Payment Intents at different points in your flow? Creating a Payment Intent shouldn't be overriding an existing one - it'll create an entirely new one

austere yew
#

Since we are using woocommerce (and stripe through it payment gateway), I guess there's already a payment intents somewhere that deals with the current payments. We wanted to find the way to hook on it, prevent it's default and run our code instead. It that possible..?

fading talon
#

Interesting - I would recommend checking in with Woocommerce about this as well (since I don' t have insight into how they're integration works) but I'm guessing you could rely on the payment_intent.created webhook and instead update the existing payment intent (instead of creating a new one) to add application_fee_amount (see https://stripe.com/docs/api/payment_intents/update#update_payment_intent-application_fee_amount)