#krystian

1 messages · Page 1 of 1 (latest)

proper riverBOT
hidden dove
lucid drum
#

You would want to declare that option in BillingPortal Configuration

hidden dove
#

can i set that configuration only for this session?

lucid drum
#

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

hidden dove
#

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?

lucid drum
#

Yes you can also update a Config. It's object, really

hidden dove
#

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?

lucid drum
#

They are reusable

#

What do you mean by reaccess?

hidden dove
#

can i name them?

#

im trying to understand the flow

#

i know theres a default config

lucid drum
#

The Portal Configuration is an object. You can create as many Portal Configuration as you want, each of them will have an Id

hidden dove
#

so should i retrieve it, modify the object, then assign the object to the configuration: parameter when i create the session?

lucid drum
#

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

hidden dove
#

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

lucid drum
#

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

hidden dove
#

when i create a new config, how can i have it be based off the default config?

lucid drum
#

That's tricky part, yes we don't have a convenience API to duplicate from existing one

hidden dove
lucid drum
#

Not a name, but you have metadata

hidden dove
#

can i retrieve the default, and manually copy parts of the object, into the new config i make?

lucid drum
#

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

hidden dove
lucid drum
#

Hmm

#

You are probably right. Let's test that out

hidden dove
#

i can retrieve it

#

its just seems painful to copy over everything i dont need to modify over into a new configurations.create

hidden dove
#

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?

lucid drum
#

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.:

  1. Create configuration: req_xxx
  2. Create Portal: req_yyy
  3. Update the Subscription : sub_zzz
hidden dove
#

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

lucid drum
#

Um why do you think it's being prorated? I see next Invoice is $149.99

hidden dove
#

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

lucid drum
#

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

hidden dove
#

ok

lucid drum
#

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?

hidden dove
#

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

lucid drum
#

Yeah let's try it

hidden dove
#

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

lucid drum
#

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

hidden dove
#

okay i understand

#

now i guess i need to try to figure out how to prevent the balance from accumulating?

lucid drum
#

Yeah that's a different thing. By default balance will be automatically picked up in next Invoice on any Sub