#krystian
1 messages · Page 1 of 1 (latest)
You would want to declare that option in BillingPortal Configuration
can i set that configuration only for this session?
Set this to none https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-proration_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes, for each billing portal you can define which configuration you use
So create a specific Config and only apply its Id to this Portal Session
do these configurations get stored in stripe forever?
and when i create a configuration, can i only modify that one proration setting without touching any other setting and keeping the rest as is by default?
Yes you can also update a Config. It's object, really
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
do i need to delete these configurations after im done with them?
are they meant to be reuseable?
if they are meant to be reusable, how do i reaccess them?
The Portal Configuration is an object. You can create as many Portal Configuration as you want, each of them will have an Id
so should i retrieve it, modify the object, then assign the object to the configuration: parameter when i create the session?
When you create a Billing Portal Session, you can specify the Id of the configuration that you wanted to apply
Think of it like preset of configuration
or do i need to create a new configuration entirely, name it something (so that i dont have to create the same config later), and then pass it to the session params
so its completely fine to just keep creating new configurations on stripe via the API and never clean them up? lol
It's no harm, just your preference if you don't feel you need to clean up. But cleaner approach would be just create a few presets you want
when i create a new config, how can i have it be based off the default config?
That's tricky part, yes we don't have a convenience API to duplicate from existing one
how do i actually create these presets? is there a field i can pass in config.create API that allows me to name the config?
Not a name, but you have metadata
can i retrieve the default, and manually copy parts of the object, into the new config i make?
I am afraid the default might not be available already as retrieable object.
I guess you may want to create a "default" one on your own, once, then save its somewhere on your own database
then next time you can call Retrieve Configuration to see its properties, then make a new one based on that
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
could i retrive the default this way? https://stripe.com/docs/api/customer_portal/configurations/list#all_portal_configurations-is_default
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i can retrieve it
its just seems painful to copy over everything i dont need to modify over into a new configurations.create
alright i created the configuration but setting the proration_behavior to none still keeps prorating the price
is it because im specifying subscription_update in the configuration, but using subscription_update_confirm in the session?
Hmm I think it should work tho
Could you write down the timeline of request? (provide request id req_xxx) so I can take a quick look? ie.:
- Create configuration: req_xxx
- Create Portal: req_yyy
- Update the Subscription : sub_zzz
you want the updated subscription id? or the subscription that i want to update, before it gets updated
nvm that should be the same
Configuration id: bpc_1NENPNAW7n1f4M8CX6rDBWAx
Subscription id: sub_1NELpXAW7n1f4M8CGXVPFPUd
Session id: bps_1NENPNAW7n1f4M8CTafVm26K
Um why do you think it's being prorated? I see next Invoice is $149.99
i didn't press upgrade, because the price adjustment is incorrect
im trying to switch from the $149.99 plan (which the user is on a trial for, hasn't paid) to the $199.99 plan and charge them the full $199.99 immediately
however, in the subscription_update_confirm page, it keeps saying its going to prorate the difference
the amount due today should be $199.99
this is the current plan
as you can see, its on a trial, so the user hasn't been charged yet
in the event the user wants to upgrade from the plan which we offer the trial on, immediately up to the pro plan which is paid only, i need to charge them the full $199.99
however, if the user actually gets charged at the end of the trial for the $149.99 plan, then okay, prorating makes sense
otherwise, if they haven't paid anything yet during the trial, and they want to upgrade to Pro, i want to charge them the full amount of $199.99 and reset the billing cycle right at that moment
because that will be the actual first payment
Yeah I understand. It's a bit odd to see "Applied account balance" of -$0.08 and I am not sure if that's proration. Can you just process to update? This is a test and let's see if it is really prorated
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I think the $0.08 is applied balance, not proration
If you do the same flow again, on this Customer, would you see full $199 this time?
should i just completed delete the customer, and start from scratch?
and do the flow again?
i dont have an easy way otherwise to the user (my account) back onto the trial after they pay for an upgrade
Yeah let's try it
ok
lol its fine now
any idea how or why a balance could accumulate
previously, i was basically testing upgrading/downgrading between the plans
but - it might be fine, because the previous subscription trial was created yesterday
so an actual day passed
is there anyway to test whether that will make a difference now
okay i was able to recreate the balance
i upgraded from $149 to $199, then downgraded to $149, then upgraded to $199
now there is a balance of $0.01
for context - im testing this so that someone can abuse the system. When they upgrade to $199 their account gets 50 system credits. I noticed that when i downgraded from $199 to $149, that it said the user will only get charged $99 on the next billing cycle - which is a problem, because they could game our credit system. However - i dont yet have a custom configuration for the downgrade session
I kinda understand what you want to test, but I doubt there was proration generated. Whenever you upgrade and downgrade, you would see the Invoice and if there is no proration mentioned in the Invoice, that wasn't proration AFAIK
okay i understand
now i guess i need to try to figure out how to prevent the balance from accumulating?
Yeah that's a different thing. By default balance will be automatically picked up in next Invoice on any Sub