#aaron_subscription-applicationfee

1 messages ยท Page 1 of 1 (latest)

full duneBOT
ornate barnBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

full duneBOT
#

๐Ÿ‘‹ 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/1273765471371530260

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

spice light
#

aaron_subscription-applicationfee

ancient zinc
#

Basically I'm wondering:

If we apply subscription_data.application_fee_percent to a checkout session, do we get that fee for every reocurring subscription that came from this checkout session?

spice light
#

@ancient zinc for as long as the Subscription is active/accepting payments

ancient zinc
#

ooo, okay, so let me run another scenario by you.

Lets say we have 2 plans. 1 has a 1% fee the other has a 0% fee.

Is there any way if the user upgrades to a plan with 0% fees to stop collecting the 1% fees from when they were on their previous plan?

spice light
#

There is as long as you write the code for it really. You as the developer control what they do, what Price(s) you offer, etc. So when you let the Customer move their Subscription from Price A to B you can change the application_fee_percent on that Subscription.

If you are using no-code solutions such as the CustomerPortal then no that's not possible

ancient zinc
#

Right right, so if 100 subscription payments were processed under their account at 1%, when they upgrade to a 0% plan we'd go back, loop through all previous subscriptions made at 1% and change that to 0%?

spice light
#

yes, though you really would do it in real time either when you update the Subscription, or if you use a no-code solution you can write a webhook handler that automatically changes the application fee amount/percent based on the new Price(s) on the Subscription

ancient zinc
#

awesome awesome, seems easy enough. so when they upgrade to plan 0% we'd do it then via code

spice light
#

yep

ancient zinc
#

great, that totally works. thanks again for your time! this discord is an amazing resource

spice light
#

Happy to help ๐Ÿ™‚

ancient zinc
#

actually real quick, is there an easy way to get those particular subscriptions.

maybe we can query metadata.userId (from our side) + subscription_data.application_fee === 1?

spice light
ancient zinc
#

so we'd basically just load all of them and determine what to change in our own logic? no way to query/filter?

#

ooo i see a search endpoint hold on

spice light
#

no the Search API won't help with any of this

#

in theory as a platform you should already be tracking all of this in your own database, mapping individual Subscriptions to the real Customer of your platform and the right connected account it's created on