#savan3280
1 messages · Page 1 of 1 (latest)
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.
this customer is currently in this situation cus_PdBQhFO2WNqlP4
i was expecting the first invoice to be 3/1/24
For the scenario you described, I'd recommend using Subscription creation directly with backdating feature: https://docs.stripe.com/billing/subscriptions/backdating?dashboard-or-api=api#backdating-billing-cycle
I'd recommend setting proration_behavior to none to prevent charging in the first invoice till the next cycle and billing_cycle_anchor to the next billing cycle
i saw that backdating subscriptions article but that's for subscriptions and they dont have the backdate parameter for SubscriptionSchedules
i already have the proration date for the phase set to none
and there seem to be only two valid values for the proration anchor "automatic" and "phase start"
so i'm not sure what you mean by set the anchor to the next billing cycle
https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-phases-billing_cycle_anchor
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i cant create a subscription because i dont have a payment method yet
Why do you want to use Subscription Schedule for backdated subscription?
Can you share what you would like to achieve?
in my initial message i said this, does it make sense?
I'm trying to import a subscription that started 3/1/23 and should invoice on 3/1/24. not sure how to do this.
it's an annual subscription product
This can be done directly with Subscription API directly as suggested in the doc for backdating a Subscription and charge in a future date: https://docs.stripe.com/billing/subscriptions/backdating
Subscription Schedule is not required
to my knowledge you cant create a subscription without a payment method
and as i said i dont have the payment method yet
that is why i'm trying to use a Schedule, because you dont need a payment method for a schedule
i tried this:
trial = stripe.Subscription.create(
customer=customer_id,
items=[{"price": price_id_of_product}],
# march_1_2023 = 1677666015
backdate_start_date=1677666015,
# march_1_2024 = 1709332219
# billing cycle anchor to 3/1/24
billing_cycle_anchor=1709332219
)
and got this
stripe.error.InvalidRequestError: Request req_OImsynLXNEDDb7: This customer has no attached payment source or default payment method. Please consider adding a default payment method. For more information, visit https://stripe.com/docs/billing/subscriptions/payment-methods-setting#payment-method-priority.
proration_behavior wasn't set to none in your request
oh dang
i just realized that also
i had it set in the sub schedule but not the subscription request
by setting to proration_behavior to none, no immediate payment is required which you can collect payment method later with Setup Intent under pending_setup_intent