#hari-subscription-migration
1 messages · Page 1 of 1 (latest)
yes so that led me here which is what I'm doing https://stripe.com/docs/billing/subscriptions/import-subscriptions#create-subscriptions
but is there a way to create the subscription without having it bill for the current period? or would that have to just be a trial?
I mean that section says future right?
My guess is you passed a start_date in the past?
yes
I'm struggling to grasp the problem I'm sorry. You asked how to import so I shared the doc, then you said you read the doc but it doesn't work but the doc say to put a start_date in the future and you passed one in the past.
Why can't you fix it to pass a start_date in the future? What's preventing you from that
Passing a future date doesn't create a subscription in an active state, which is the goal
i.e. the subscription is currently live, the user has just already paid for the current term
thanks, that's what I needed really. You want to use backdate_start_date on Subscription creation (no SubscriptionSchedule) and pass proration_behavior: 'none' alongside `billing_cycle_anchor I think.
Example in PHP: $subscription = $stripe->subscriptions->create([ 'customer' => 'cus_123', 'items' => [ ['price' => 'price_123', 'quantity' => '1',], ], 'expand' => ['latest_invoice'], 'backdate_start_date' => strtotime('first day of this month'), 'billing_cycle_anchor' => strtotime('first day of next month'), 'proration_behavior' => 'none', ]);
okay great, that worked, thanks!