#sylar_best-practices

1 messages ยท Page 1 of 1 (latest)

jade valveBOT
#

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

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

ionic mica
#

-_-

#

lolz

#

Hi! Let me see what I can find for you.

#

In the middle of subscription period client should be able to add (extend) some products to the current subscription.

When do they pay for this? At time of addition, or as part of tthe regular billing cycle?

#

Ahhh ok. So I see you're building a bike rental app; unless you're doing really really long term rentals, I'm not sure the Subscription model is quite right?

sullen rampart
#

Hey.
They should pay calculated extra.
For example we have monthly subscription (which is ~30 days) and client adds a product on 15th day. So it should be product.monthly_cost / 2 payment (extra)

sullen rampart
ionic mica
#

Interesting.

sullen rampart
ionic mica
#

It's an interesting puzzle.

jade valveBOT
ionic mica
#

I gotta jet but my colleague @pulsar geyser has got you. ๐Ÿ‘

sullen rampart
#

Ok, thanks

pulsar geyser
#

there are a lot of open threads so i might be a little slow! but i'm catching up now

sullen rampart
#

Thats alright, take ur time

pulsar geyser
#

ok, so theoretically i think your first question seems totally doable. subscriptions can be modified in the middle of a period and we have a prorations feature that handles the changess to cost

#

is that what you're looking for, or am i misunderstanding?

sullen rampart
#

Does this method only updates existing items in the subscription list or I can add a new one in the running subscription using this method?

pulsar geyser
#

it's been a bit since i've tested it but i think you can do both, let me verify

#

actually do you have a test environment handy? i'm juggling multiple threads atm, but i think if you call this and just pass in the items property with the existing items.id and a new item in the array it should work

sullen rampart
#

Thank u very much!

#

And the last thing:
What about using the same Subscription API for n-days rental?

pulsar geyser
#

ooo yes i forgot about that. i might need to circle back to you as i'm still juggling multiple threads ๐Ÿ˜… i appreciate your patience!

sullen rampart
#

thanks!

pulsar geyser
#

ok i'm back!

#

working on groking your business requirements here

#

i've never done any testing on daily billing periods tbh, do you have a working example of that?

#

ok yes i just had to sanity check that we supported that ๐Ÿ˜…

#

ok. so your question is....

charge for daily usage, but only bill / charge on a non-daily (e.g. weekly) period?

#

if so i don't think we have great OOTB support for that

#

you could do something very complicated using billing meters and log daily usage to a meter, then charge that on whatever period you want. but then you'd need to be managing / updating the meters on your end

sullen rampart
jade valveBOT
thorn haven
#

Hello
Give me a moment to catch up here.
It is a bit information heavy thread, can you give me a quick summary of your usecase?

#

Can you give me an example of your usecase with example amounts to make sure we're on the same page?

sullen rampart
#

For example client rents a bike for 5 days. I want to use Subscription API as well for this type of period. Am I able to do that? The client will be one-time charged with no subscription prolongation

thorn haven
#

If its a one-time charge then you shouldn't create a subscription for this, no

#

Subscriptions are used for recurring charges like $x per specific interval