#tymm

1 messages ยท Page 1 of 1 (latest)

warm flickerBOT
plain trellis
#

Gimme a few mins to catchup with the thread

#

Okie how about this

#

Let's say today is Sep 27. You create 2 phases:

  1. Phase 1 from now(Sep 27) to Oct 1, price = 10$
  2. Phase 2 from Oct 1, same price, setting billing_cycle_anchor: 'phase_start', same price = 10$
#

This way, you will immediately have an Invoice 1 of $10, then on Oct 1 will have a prorated Invoice 2 of -($10-around $9 for unused time) + another $10

#

The total would be around 11$ which is for Sep 27 -> Nov 1

#

And from Nov 1 it will be a normal monthly $10

#

If you want to, furthermore, combine Invoice 1 and Invoice 2, you can apply a 100% discount on Invoice 1, then add an additional item of $10 on Invoice 2

#

It's a complicated setup TBH

ancient scarab
#

ok thanks

#

btw is there docs that list out all the stripe callbacks? i cant seem to find them online

#

like invoice.finalized charge.succeeded etc

plain trellis
#

You mean webhook events?

ancient scarab
#

yeah all of them

plain trellis
ancient scarab
plain trellis
#

It will automatically be that way

#

On phase 2 you put the monthly price already

ancient scarab
plain trellis
#

Okie, now you have 2 Invoices, correct?

#

in_1LmTT5LK0bfo5HSbC7tfSV5u in draft and will be finalized in 1 hour

#

and an upcoming Invoice on Oct 1

ancient scarab
#

seems so, yeah

plain trellis
#

Now you apply a 100% discount to in_1LmTT5LK0bfo5HSbC7tfSV5u while it's still in draft

ancient scarab
#

if i have multiple subscriptionitems in the subscription and in my use case i want all of them to be 100% off so i can just set discount on the invoice level, right? or do i need to set them at invoiceitem level?

plain trellis
#

Yes I think so (please test it out)

ancient scarab
#

yes im testing as we speak ๐Ÿ˜„

ancient scarab
plain trellis
#

It would be a bit complicated. You will need to save/memory the task somewhere in your database. In the future when the UpcomingInvoice created and send a webhook event to you, you catch it and modify while in draft state, by adding an invoice item of $10

ancient scarab
#

erm but i want to charge customers immediately, since i want an upfront payment so charging them later during the billing cycle doesnt make sense...

plain trellis
#

like, on Sep 27 instead of Oct 1?

ancient scarab
#

yep

plain trellis
#

Okie taking back the step of adding 100% discount.

#

Instead, you call the Upcoming Invoice to see the prorated amount "RM17.81", then add an invoice item into the current Invoice of "RM140.00"

#

then in future, make sure to discount them 100%

#

so you will invoice them RM157.81 today, but will bill RM0 (discounted) on Oct 1

ancient scarab
#

i see

#

may i know what are the circumstances and use cases to create subscription schedule from an existing subscription?

#

is it possible to shcedule subscriptionitems updates eg:
customer have existing subscription and i want to update the subscriptionitems in the subscription in 2 months (november cycle)