#ShaiTheGuy-mock-intervals
1 messages · Page 1 of 1 (latest)
Hello, what exactly are you trying to test with subscriptions? Payments, subscription schedules, etc?
I'm trying to add a payment method to a subscription, but I want to add that couple of days of after the creation of the subscription
@mellow ibex we don't really support something like "advancing time" today in Test mode, but you can simulate this yourself. Create a Subcription with a trial period of a few minutes for example and then pretend it's been 2 days and that you're adding the payment method before it renews for example
I see, is it ok if I ask another somewhat related question about subscriptions here?
Yup! go ahead
What I'm trying to do is to start a subscription for a customer when i take them "live", but that customer will provide his payment info only after a certain period of time (which is unknown), how would you go about doing that in stripe?
What I've done so far is creating a free subscription and when they provide their payment info I charge them retroactively using a payment intent, and then I just change the subscription price to continue charging them based on the billing cycle
When your customer provides payment info at a later point in time, do you still want to charge them retroactively for the time between the start of the subscription until when they provided payment information?
yes i do! the way I charge them is number of months (since start) * price
to be more accurate it's ceil(number of months * price per month)
Is it a hard requirement that you create the subscription before you collect the payment information? Something that may work for you is that you store the date that they start the subscription somewhere, but don't create it yet, and when they're ready to give payment information you create a backdated subscription (https://stripe.com/docs/billing/subscriptions/backdating#backdating-charging) that will charge them time that hasn't been paid for yet
that's an interesting idea, do I have control on how to calculate the proration charge? the way my team wants it to be is to charge them for full months, and as far as i can tell stripe calculates price per day given the monthly fee
Are you speaking specifically about the prorated amount charged at the start of the subscription, or just about prorations in general?
the prorated amount charged at the beginning of the subscription
I'll give you an example if that's ok: lets say a customer is being taken "live" at May 1st and provides their payment info at May 15, we want to charge them the full amount for the first month on May 15th, and then continue charging them as usual on June 1st (billing cycle)
Gotcha - so then I'd suggest looking into backdating + setting the billing cycle anchor. . Using your example, if you were create a subscription on May 15th, backdate it May 1st and have the billing cycle anchor on June 1st you would be immediately charged for the time from May 1st - June 1st. We talk about this in our docs here: https://stripe.com/docs/billing/subscriptions/backdating#backdating-billing-cycle
i'll take a look, thank you so much!
happy to help! definitely try it out in test mode and see if it behaves like you want it to 🙂