#mymo-application-fees
1 messages · Page 1 of 1 (latest)
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?
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.
Gotcha! Have you taken a look at this part of our docs? https://stripe.com/docs/connect/direct-charges#collecting-fees
What does your code for creating a Direct charge look like right now?
So it looks like you're already taking an application fee - is something about this not working as you expect?
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)
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
So this code will just override the Stripe initial paymentIntent creation that exists already within our website..?
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
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..?
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)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.