#savan

1 messages · Page 1 of 1 (latest)

frozen harborBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • savan, 23 hours ago, 5 messages
median sail
#

hi there!

#

can you share an Invoice ID (in_xxx) with this issue?

novel ingot
#

hi the invoice is in_1OP3YRJJCQbUhES2qa5wPEpu

median sail
#

and what exactly would you like to be different in this invoice?

novel ingot
#

the next invoice date i guess should be 12/13/24

#

the subscription started and paid 12/13 on another platform and it's annual

#

should i set a trial period to end on 12/13 in this case?

#

12/13/24 that is

#

the api seems keyed in on import date instead of the billing anchor

median sail
#

If you want the first invoice on 2/13/24, then you need to create a free trial until 2/13/24 yes

novel ingot
#

should the free trial be a different "phase"?

#

in my example code 12/13/23 is the value of product_start_epoch_pacific

frozen harborBOT
novel ingot
karmic raven
#

Hi there 👋 jumping in as my teammate needs to step away soon. It looks like you're already using Subscription Schedules, which based on what you're describing is the approach I would have suggested.

Do you need the new Subscription in Stripe to start immediately as well? I see you're using the start_date parameter on the Subscription Schedule, and was thinking you could drop the trial period and instead use that start_date to have the new Subscription start on the first date it should send an Invoice.

novel ingot
#

Yes, i'm leaving my old platform and some customer will be in the middle of an annual subscription.

#

a person could've paid for an annual sub on 12/13 and I'll import them at the end of the year. they need to show subscribed and next billing be 12/13/24

karmic raven
#

Hm, if you need them to start right away, it may be easier to just create Subscriptions, let me take another look there.

novel ingot
#

this subscription actually is close
sub_1OP3sgJJCQbUhES2bRykBNyi

#

looks like the sub started on 12/13/23, shows active, but the invoice date is 12/19/24. not sure why it's not 12/13/24

karmic raven
#

Do you still have the code that created that Subscription handy? There are two parameters I'd recommend trying to add to it if so.

novel ingot
#

some difference between started and created:

#

and wants to invoice on the created date instead of started date

karmic raven
novel ingot
#

yup, i used billing anchor

stripe.SubscriptionSchedule.create(
customer=customersByEmail[customer_email].id,
metadata={"imported_from": "trainerize"},
default_settings={
"billing_cycle_anchor": "start_date",
"collection_method": "charge_automatically"},
phases=[
{"items": [{"price": PRICE_ID}],
"proration_behavior": "none",
# "trial_end": 1704138038
}

],
start_date=product_start_epoch_pacific,

)

#

the start date is 12/13 or 1702526400 as epoch

#

the price is
price_1OMm0xJJCQbUhES2GOYOrAdQ

karmic raven
#

That code doesn't seem to be what created the Subscription you shared. The Subscription you shared was started directly, rather than using a Subscription Schedule as that snippet does.

novel ingot
#

and it's a test customer
cus_PCO9lisQhEi1XY

#

in the subscription log shows an api call i just made

karmic raven
novel ingot
#

hm, yes, i see it doesnt have my metadata in it either

#

could you look again plz

#

the sub is sub_1OP41vJJCQbUhES2vpD5WAn4

karmic raven
#

That one came from a Subscription Schedule, but is it closer to what you want than the one you shared previously? I'm thinking Subscription Schedules may be unnecessary here.

novel ingot
#

the invoice day still is the create date as opposed to start day

karmic raven
novel ingot
#

sub_1OP4GwJJCQbUhES2CGVX3eiM

#

looks like that set the dates correctly

#

am i going to miss out on anything by not using schedule?

karmic raven
#

Nope. Subscription Schedules are there to wrap Subscriptions, they allow you to schedule changes that will happen to the associated Subscription in the future. As long as you don't need to do that, you should be fine working directly with Subscriptions.

I would recommend double checking that's behaving exactly as you want inside of a Test Clock:
https://stripe.com/docs/billing/testing/test-clocks
That will let you create a Customer/Subscription inside of a small sandbox where you can advance time and see how the Subscription will behave throughout it's lifecycle.

novel ingot
#

great, I'll test it w/ the clock. Thanks for the help Mr. Toby-