#causey_schedule-update

1 messages ¡ Page 1 of 1 (latest)

torpid belfryBOT
#

👋 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/1498416092941385939

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

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.

west mural
#

Hello
Unfortunately, don't think it's possible to load up API docs that old. You can try waybackmachine to see if that helps

knotty willow
#

ok, was the stripe documentation always at docs.stripe.com?

west mural
#

could be misremembering

knotty willow
#

let me check

#

were subscription schedules not available in the 2019-02-19 version of the API? I don't see it in the wayback machine snapshots.

west mural
#

The API predates me but I believe it existed in that API version

knotty willow
#

at least not until 2020, and then it still doesn't match what I'm seeing.

#

the 2020 docs still show phases.items , but it seems like the actual subscription schedule I'm getting has phases.plans:

In [6]: sched.phases
Out[6]: 
[<StripeObject at 0x7d850d1872e0> JSON: {
   "add_invoice_items": [],
   "application_fee_percent": null,
   "automatic_tax": {
     "disabled_reason": null,
     "enabled": false,
     "liability": null
   },
   "billing_cycle_anchor": null,
   "billing_thresholds": null,
   "collection_method": null,
   "coupon": null,
   "currency": "usd",
   "default_payment_method": null,
   "default_tax_rates": [],
   "description": null,
   "discounts": [],
   "end_date": 1769922000,
   "invoice_settings": null,
   "metadata": {},
   "on_behalf_of": null,
   "plans": [
     {
       "billing_thresholds": null,
       "discounts": [],
       "metadata": {},
       "plan": "plan_TvTDAVFZPi4Rlk",
       "price": "plan_TvTDAVFZPi4Rlk",
       "quantity": 1,
       "tax_rates": []
     }
   ],
   "prorate": true,
   "proration_behavior": "create_prorations",
   "start_date": 1767243600,
   "tax_percent": null,
   "transfer_data": null,
   "trial_end": null
 }]
west mural
#

Prior to that API version, it was called plans

knotty willow
#

nice, that explains it.

#

so it would be the same name in the modify call then.

west mural
#

correct

knotty willow
#

sweet. I think that's what I needed.

#

and hopefully any 400 errors will tell me what fields I'm missing.

#

should I expect to be able to feed a schedule.phases array into schedule.modify(phases=<whatever>) in order to add a phase, or am I going to have to manually reconstruct the modify input?

#

I know on the more recent API versions, I can't pass the existing phases list unmodified.

west mural
#

Yeah the shape hasn't changed drastically as far as I know.

You can check the changelog here in case some param doesn't show up/look different - https://docs.stripe.com/changelog?filter=Subscription+Schedules&category=all

should I expect to be able to feed a schedule.phases array into schedule.modify(phases=<whatever>) in order to add a phase, or am I going to have to manually reconstruct the modify input?
I think you can omit past phases but still would need to pass the current and future phases

torpid belfryBOT