#manuel_api

1 messages ¡ Page 1 of 1 (latest)

rancid kindleBOT
#

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

📝 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.

slender elk
#

Hi there

#

Do you have a specific Subscription ID that you are testing with?

tawdry minnow
#

yes, sub_1SDSMTESRxUGxqvh7w23N9m7

slender elk
#

Also if you set proration_behavior: 'none' this means that no proration will be charged upon the update. So if you are updating a Subscription with the same interval (like monthly) then there would be no immediate charge.

#

And the next Invoice would be for the full amount of the newly updated Price.

#

Can you clarify what is unexpected for the above Subscription?

#

And what your desired behavior is here?

tawdry minnow
#

Yes, I understand that, because if I return the subscription to a previous status of failed payment, the idea is that I don't charge again for making that change, so I set that proration_behavior to None, but I see that it says it will charge 0.00 on the next charge. Is this correct?

Ideally, if the customer makes a payment and it fails, the subscription should be returned to its previous state before the payment was made and the invoice should be canceled. I was advised to use that setting in the API for prorating to avoid being charged when making the modification after the payment was rejected.

#

Should everything continue as before? Right? And charge him for what he has in his customer subscription.

slender elk
#

Well you can see the Invoice preview there in the Dashboard with each line item. It looks like there are various proration items involved.

#

That caused proration items to be generated.

tawdry minnow
#

hmm thats weird, because im doing this

stripe.Subscription.modify( current_subscription.stripe_id, items=items_subscription, proration_behavior=None )

slender elk
#

Well you'll want to clear your cache and make sure your code is saved.

#

Because in the request I shared proration_behavior was not passed.

#

I'd start with a fresh Subscription and test again

tawdry minnow
#

yeah thats a new subscription

#

i created the subscription via API

slender elk
#

Yeah I'm saying I'd do the whole process over again.

#

And make sure it is using the code you shared above

#

Which passes proration_behavior: 'none'

tawdry minnow
#

nothing else?

slender elk
#

Not sure what you mean?

#

Re-run your test and look at what happens with the Subscription when you actually do pass proration_behavior: 'none' and see if it is the behavior you expect.

#

If not, then happy to look at a new example.