#mrcoles

1 messages · Page 1 of 1 (latest)

prime oxideBOT
hoary lava
#

Hi there

#

Yep that's the way to do it if you want to create it inline as opposed to ahead of time.

#

It might be easier to just create the Price prior to the Checkout Session though

#

And no, no plans I'm aware of to support product_data inline

deep locust
#

Oh dang, I’m seeing I missed the from_subscription attribute in my call to stripe.SubscriptionSchedule.create(…). I’ll need to try running that and see how that changes things

#

but ya, the whole reason I’m doing the price/product inline is to make it easier to have custom description text to appear in the hosted checkout

hoary lava
#

Oh didn't realize you were excluding the from_subscription in your actual creation

#

Thought you were talking about the update thereafter

#

But yeah that's fair if you don't want to create many different Prices ahead of time. It basically works fine either way though

deep locust
#

Sorry, yeah, I’m testing that now, I’ll ping back if I run into other issues—thx for the pointers!

hoary lava
#

Sounds good!

deep locust
#

oh actually, with from_subscription would I have to (1) create a schedule from an existing subscription and then (2) in a separate API request somehow update iterations or would I essentially have to add a new phase (I’m not seeing a way to just update iterations)?

I see there’s an installment plans (https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#installment-plans) example in the docs, but it’s incompatible with the hosted checkout and I’m trying to reuse the hosted checkout for this

hoary lava
#

Ah sorry missed this followup @deep locust !

#

You can update iterations by passing the current Price and timestamp for phase 0 update of your Sub Schedule