#ben-clum_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/1225076908837048320
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hmm. I'm curious If you use upcoming invoice API endpoint to check the next invoice, are you seeing new application fee there?
https://docs.stripe.com/api/invoices/upcoming
are you asking me to try that? or if I used it?
If you've not tried it then I'd recommend giving it a go. I have a theory but testing would likely confirm what I am thinking
kk checking!
oh I just realized upcoming invoice API does not have a application_fee_percent. only the application_fee_amount.
I don't see why it wouldn't use that
actually no it doesn't even have that for the endpoit
Ah sorry, should've been more clear. My theory is that we don't apply the newly updated application fee percent on the proration invoice. We'd likely use that for the next recurring invoice.
Since you've updated the subscription already, I was hoping if you could check the next recurring invoice and see if the correct application fee was reflected there
I just tried setting application_fee_perent on the subscription, and then used the upcoming_invoice API and the application_fee_amount is null. so looks like it's not pulling it.
- set the application_fee_percent on the subscription to
11.2 - called the upcoming invoice API
- application_fee_amount was
nullon the invoice.
so yeah you're theory is correct
I don't think my theory is correct though yeah? Since you're not seeing the application fee being reflected?
oh I tried something else:
- set the application_fee_percent to 11.2
- changed the payment plan in a separate API call
- the application_fee_amount is set, but it's using the OLD 11.2 percentage, not the new percentage
so it seems like it doesn't use the new percentage if you update them both in the same API call
here's that API call https://dashboard.stripe.com/test/logs/req_4LNZ0Il74CDNCJ
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
old application fee was 11.37?
here's another attempt: https://dashboard.stripe.com/test/logs/req_ijBaMLuj4j7IHV
but there was no fee:
https://dashboard.stripe.com/test/events/evt_2P1UMu250JCmBXjU0Db2WSVI
and then another attempt here on the same subscription: https://dashboard.stripe.com/test/logs/req_ijBaMLuj4j7IHV
but this time there is a fee: https://dashboard.stripe.com/test/events/evt_2P1UPO250JCmBXjU0t1yuU2z
I tried updating the percent in a separte API call before I updated the subscription, but it still didn't pull the fee:
- update fee: https://dashboard.stripe.com/test/logs/req_hio3TyuLRRoo5s
- update payment plan: https://dashboard.stripe.com/test/logs/req_cbIwhnNL5zAsQb
and then the invoice created from that: https://dashboard.stripe.com/test/events/evt_2P1UTR250JCmBXjU1pEjjIrb
It looks like there actually was an application fee. If you look at the payment intent pi_2P1UIf250JCmBXjU1LAf6QLH, there is an application_fee_amount of 7857
I"m not sure which example you're looking at, but both of the most recent examples do not have fees
I don't think you're looking at the right example
yeah I confirmed you're looking ath the wrong example.
Was working off of a colleagues notes req_4LNZ0Il74CDNCJ made sub_0P1TsN250JCmBXjUBWyNqtHM which created in turn created in_0P1UIf250JCmBXjUwipol8le with pi_2P1UIf250JCmBXjU1LAf6QLH which does have an application fee amount set. I do see that the more recent example from req_ijBaMLuj4j7IHV does not. Looking in to that with my colleagues
The objects from the later example for reference
req_ijBaMLuj4j7IHV -> sub_0P1UM6250JCmBXjUM65Hjvtr -> in_0P1UMu250JCmBXjUKBtKolbc -> pi_2P1UMu250JCmBXjU0PQUTnIg
kk let me know what you find
FYI still looking in to this. This behavior is turning out to be difficult to parse out
let me know if you need anything else, like maybe clear steps to reproduce
- create subscription
- set application_fee_percent to 0
- update subscription with a new payment plan and set the application_fee_percent to anything other than 0 (e.g. 11%) in the same API call.
- the subsequent invoice created does not have a application_fee_amount.
this was also attempted:
- create subscription
- set application_fee_percent to 1%
- update subscription with a new payment plan and set the application_fee_percent to anything other than 0% or 1% (e.g. 11%) in the same API call.
- the subsequent invoice created does not have a application_fee_amount.
@ocean steeple it turns out there is a configuration that prevents application fees from being applied to "one off" invoices. Which it sounds like these proration invoices count as, probably because they are made up of only invoice items.
So if you talk to our support team, they should be able to help remove that configuration from your account. https://support.stripe.com/?contact=true
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.