#todordvv_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1229932456979988545
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
So what is the point of even setting "application_fee_percent" to subscriptions when it does nothing when issuing invoices or making charges for that subscription? And how can I make sure to update invoices' "application_fee_amount" before charges happen when automatically charge credit card on record is selected when creating a subscription or invoice?
Hi there, sorry for the delay
No worries!
I was looking through the Event ID you shared and trying to put together a timeline
I can share more event IDs but the issue I am having is the events fire in the wrong order for some of these automatic charge collections and it all happens too quick - there's not enough time to edit the invoice before it's paid.
Are you hoping to use percentage or amount?
Ideally I would want to be able to set percentage and everything from there on-out to happen automatically.
The basic gist is that my clients went with stripe for their franchise, and they were assured they can automatically collect a % of every transaction that the connected accounts make.
But when it came down to it there's no such setting on the dashboard level that will auto collect application fees in a set percentage from all transactions by connected accounts.
The reason I ask is because I see the application_fee_amount value for this first invoice of this subscription was updated manually
Yes, I first tried to update the application_fee_percent for the subscription, based on the subscription.created hook
and that worked but the invoice that was created (when paid) didn't result in any application fees being charged
and the data for the invoice showed application_fee_amount = 0
so clearly setting the application fee percent on the subscription object did nothing
I even tried the forward time tool and any future invoices also didn't have application_fee_amount assigned
so then i hooked into invoice.created and set it up so that the application_fee_amount is set to the total value of the invoice * 17 / 100 - which is 17%
and that works now for any invoices that are set to be sent via email and manually paid.
but it does not work for subscriptions that are set to automatically charge the card on record, the invoice, payment intents and charge all are created and processed so quick that there's no time to update any and the webhook events are actually arriving out of order and/or too late
--
an alternative way that I read this can be done maybe is instead of updating the application fees is to charge the connected account a percent of every invoice.payment_succeeded
event
I'm looking through the events for this Subscription and tracing the Invoices that were created as the test clock was advanced
i think this might be a simpler and safer approach
just charge the account a % whenver an invoice is paid
question is which attribute to base the charge on - amount_paid or total. I guess the amount_paid would be best since it probably reflects whatever charge was made and what $$$ amount went into the balance
I'll flag this to our team as well. I'd expect the application_fee_amount on the second Invoice onward to reflect the 17% fee you set on the Subscription
I also recommend enrolling in this beta if you're interested in configuring application fees via the Dashboard: https://docs.stripe.com/connect/platform-pricing-tools
The beta sounds like exactly what we need. Should I enroll with the master account for our stripe?
Yes, I recommend enrolling the platform account
Can I ask one more thing please?
API related
I am trying to follow this example:
to instead charge an account when a payment is completed but I get:
Cannot create account debit on this account; please contact us via https://support.stripe.com/contact with details for assistance.
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
why can't I charge an account directly?
can you share the request id [0]? it'd look like req_xxx
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
req_bgefyr9yUKawTK
you're attempting to debit a Standard account which is not supported
https://docs.stripe.com/connect/account-debits#charging-a-connected-account
This functionality is only supported for connected accounts where your platform is responsible for negative balances, including Express and Custom accounts.