#sanjeev-sundaravarathan_api

1 messages ¡ Page 1 of 1 (latest)

median tuskBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1294258411982032898

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

placid pivot
#

How does the schedule behave currently?

ebon slate
#

request_data = {
"customer": customer,
"start_date": "now",
"phases": phases,
"expand": ['subscription.latest_invoice.payment_intent.invoice'],
**subscription_extra
}

#

phases = self.get_phases(invoice_date, frequency, subscription_extra, amount, currency, product,
interval, interval_count, subsequent_invoice_charge)

#

subscription_schedule = stripe.SubscriptionSchedule.create(
**request_data
)

#

this is the current code

#

{
"items": [
{
'price_data': {
"currency": currency,
"product": product.id,
"recurring": {
"interval": "day",
"interval_count": phase_interval_day_count
},
"unit_amount": phase_amount
}
},
],
"iterations": 1,
**application_fee_data,
}

phases will be created under a loop

placid pivot
#

Sorry, not sure what you're explaining here. What is the current behaviour, and what do you want to actually happen?

ebon slate
#

Sorry,

Currently when i use subscriptionSchedules, i cant pass the payment_behavior as default_incomplete, because subscriptionSchedules doesnt respect this right ?

#

What are my alternative options use it in subscriptionSchedules

#

Thank you for taking my message. I'm here to follow up your case, regarding your subscription set up. I hope you're doing well.

While taking into consideration your most recent comment regarding the payment_behaviour on top of Subscription Schedules API, I'm afraid to say that we don't support this parameter yet. Although you can still create a subscription and its respective schedule in separate API calls while using the from_subscription parameter:

https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-from_subscription

This way, you can set the payment_behaviour to allow_incomplete while placing a schedule on top of it.

Please don't hesitate to share your comments with me in this case; I'd love to see your point of view.

I have received this email from the stripe support, where if i use from_subscription then i cant pass the phases

placid pivot
#

You'd need to update the schedule after creation, then you can amend the phases as needed

ebon slate
#

so create the normal subscription pass payment_behaviour and then create schedule using from_subscription and add the phases right ?

placid pivot
#

Yep