#ironbeard
1 messages · Page 1 of 1 (latest)
I suppose this is the invoice in question: https://pay.stripe.com/invoice/acct_16cLUMCoTIfwbn28/test_YWNjdF8xNmNMVU1Db1RJZndibjI4LF9NWHhCa1lvTmdxbXY5ZnB1eVZSbE9Dc1pBS2dMQ1RLLDU1MzU0NDA10200C2gsseUs/pdf?s=ap
That should create a customer balance that would be applied to the next invoice with a positive total
Gotcha. Also it looks like I should be using invoice.amount_due instead of invoice.total to show the customer their..well, amount due in check out.
Is there a property of Invoice that lists the current customer balance?
Not in the invoice itself
But you can retrieve it for the Customer. An Invoice should show the customer balance applied, if any
Gotcha. One other kind of separate question:
The way I'm doing the upgrades is by setting the quantity of other SubscriptionItems to zero. It's my understanding yyou have to pass in quantity=0 or the update will just add the requested items to the subscription.
But when I set the quantity to zero, the items are still on their upcoming invoice (e.g., one year from now). Is it possible to update a Subscription in a way that removes the other items, instead of just setting their quantity to zero?
Have you tried passing in the updated items array to only include the item you want to remain?
I think I need to double check that. For some reason I was under the impression you had to specify quantity zero.
gonna try real quick
Alright, let me know if that works for you
Yeah, it seems to only add the new item. req_ogPHScWcIz7kQ0
What happens if you try that when actually updating a Subscription? Like a POST request to /v1/subscriptions/sub_XXXX?
Hmm
Looks like similar-ish behavior, I think: req_dcaoykOLcMyCEM
I POSTed with only the upgrade item, and the resposne had both items listed.
Have you tried including the items you don't want and setting item.deleted to True?
https://stripe.com/docs/api/subscriptions/update#update_subscription-items-deleted
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.