#antu-proration

1 messages · Page 1 of 1 (latest)

acoustic maple
unborn cloud
#

it is created proration like this
Remaining time on UK IAO Association Member after 10 Dec 2021
1
£1.70

More options
Unused time on UK IAO Association Member after 10 Dec 2021

Which we don't wanted. So if we want to remove proration from existing subscription after changing the plan what code should we run?

#

How we will target the proration from the invoice item? We just need to remove this proration thing

#

we need to remove this red area from invoices.

acoustic maple
#

Which we don't wanted.

sure but you used proration_behavior:create_prorations which explicitly means it creates those exact things. Did you not test this in test mode first?

#

How we will target the proration from the invoice item? We just need to remove this proration thing

you'd list the items and filter by the ones that have proration:true set, those correspond to the items in your screenshot, and then you can delete them

unborn cloud
#

Yeah i did that by mistake i didn't understood that first. Let me try

#

Can't see any proration filter in dashboard UI. i have to filter that using API ? have any code for this?

#

If i target each subscription and use this code would it remove the proration from existing proration charge?

acoustic maple
#

yes you have to use the API for this

#

and no, that code doesn't remove the proration. It makes a new change to the subscription. (that's likely the code you "should have" ran if you didn't want proration, but it's a little too late now, so you'd have to write some custom code to find and delete the existing proration items now)

unborn cloud
#

okay would you please provide me that delete code? I can customize it but i just need that code which will show me which API should i call. It will be really helpful

acoustic maple
#

I can not share exact code with you, but I've linked the API above and you should test in test mode to write and test a script that does what you need.

unborn cloud
#

yeah i can pull invoice items and invoices but the problem is there is other item also available but i need to target only proration items. how can i do that? any specific code or ifilter is there from stripe for this ?

acoustic maple
unborn cloud
#

thank you so much. it was so helpful brother. I will try this. thank you so much

#

I think i can do another thing as i have more than 800 subscription so owuld it be work if i first load 100 InvoiceItems and filtered by proration true and run a loop to remove each invoice item? it would work right?