#reduce-cancel-sub
1 messages ยท Page 1 of 1 (latest)
Hello
Not sure I fully grasp the question.
Can you elaborate? An example would help too
Hello
https://stripe.com/docs/api/subscriptions/cancel
Note, however, that any pending invoice items that youโve created will still be charged for at the end of the period, unless manually deleted
exactly this situation from documentation
By having subscription id I want to reach all my invoice items to delete it
You can use list all invoice items API endpoint for that
https://stripe.com/docs/api/invoiceitems/list
Okay for customer but there is no option to retrevie it for given subscription?
The invoice items you referenced are associated with the customers and not a particular subscription.
When the subscription generates the invoice, those invoice items are automatically pulled in
Okay but if customer has two subscriptions and cancels one. And I want to remove invoioce items only for this sub (because i dont want to charge customer anymore if He has existing invoice and canceled subssription)
I dont know If i said it right
I think you're confused between invoice items and subscription items.
Okay so I will make question different ๐
Im canceling customer subscription by api
I dont want to charge customer anymore in the future even if he Has future invoice. How to do that?
stripe.Subscription.cancel("sub_xxxx") is not enough as I undestand
Just use the API ๐
https://stripe.com/docs/api/subscriptions/cancel
Note, however, that any pending invoice items that youโve created will still be charged for at the end of the period, unless manually deleted
Pending invoice items are not created by the subscription, you create them by calling the API like https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items
So if all you want to do is just cancel the recurring charge then just use the Cancel Subscription API endpoint
You can test all of the above in test mode using test clocks
NP! ๐ Happy to help