#Ömer Bayram

1 messages · Page 1 of 1 (latest)

rough coralBOT
queen umbra
#

const subscriptionSchedulePhase: Stripe.SubscriptionScheduleCreateParams.Phase =
{
items: [
{
price:
priceID,
quantity: 1,
},
],
iterations: 3,
proration_behavior: "none",
billing_cycle_anchor: "phase_start",
};

const createSubscriptionScheduleInput: Stripe.SubscriptionScheduleCreateParams =
{
customer: customer.id,
start_date: paymentStartDate ?? backDateStartDate ?? startDate ?? "now",
end_behavior: "cancel",
phases: [subscriptionSchedulePhase],
expand: [
"subscription",
"subscription.discount",
"subscription.discount.coupon",
"subscription.items.data",
],
metadata: metadata,
};

#

This was my approach but with this the billing_cycle is set to today

sturdy flume
#

Hi! Let me help you with this.

#

So, what's the exact issue you're facing?

queen umbra
#

That the customer is being charged from now on

#

But I want him to be charged from 2023-02-15 to 2023-04-15

#

For two months because the contract started in the past

sturdy flume
#

I would say it's best to create a separate invoice manually for the first 2 months, and then only charge for the last month with the Subscription Schedule (you can add a trial until next cycle starts)