#lunar_code

1 messages · Page 1 of 1 (latest)

blazing frigateBOT
#

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

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

junior boneBOT
#

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.

ornate vessel
#

Oh heya hanzo!

#

Again hahaha

ornate oar
#

Hello
So, Subscriptions API doesn't support that by default.

You'd want to use Subscription Schedules API for this instead: https://docs.stripe.com/billing/subscriptions/subscription-schedules

You can create a schedule from the existing subscription: https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#existing-subscription

Then define a phase where collection is paused & set an end_date for the phase which would be equal to the duration you want to pause for.. I don't have good docs for this part but you can look at the usecases here to jerryrig it: https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases

The next phase after that can have the regular pricing and you can unset pause_collection behavior

ornate oar
#

More or less, yes. I haven't tried this myself so I can't say this would work for sure but you'd want to create the schedule first and then update it in a separate API call.

You can't set other params along with from_subscriptions in an API call: https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-from_subscription

Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription’s item(s), set to auto-renew using the subscription’s interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.

ornate vessel
#

Omg whys that so confusing haha

ornate oar
ornate vessel
#

theres a much easier way

#

using resumes_at

#

i just found that out

ornate oar
#

OH WOW! I did completely blank on that

#

I'm really sorry.. That parameter should work 100%

ornate vessel
#

no worries!

#

i almost broke my head, glad i figured that out lmao

ornate oar
#

Yup, sorry about that and glad you're unblocked