#ironbeard

1 messages · Page 1 of 1 (latest)

thick brambleBOT
cedar cairn
#

That should create a customer balance that would be applied to the next invoice with a positive total

oblique sierra
#

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?

cedar cairn
#

Not in the invoice itself

#

But you can retrieve it for the Customer. An Invoice should show the customer balance applied, if any

oblique sierra
#

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?

cedar cairn
#

Have you tried passing in the updated items array to only include the item you want to remain?

oblique sierra
#

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

cedar cairn
#

Alright, let me know if that works for you

oblique sierra
#

Yeah, it seems to only add the new item. req_ogPHScWcIz7kQ0

cedar cairn
#

What happens if you try that when actually updating a Subscription? Like a POST request to /v1/subscriptions/sub_XXXX?

oblique sierra
#

Hmm

#

Looks like similar-ish behavior, I think: req_dcaoykOLcMyCEM

I POSTed with only the upgrade item, and the resposne had both items listed.

cedar cairn
oblique sierra
#

Oh, nice. I think I need to be doing that instead of quantity=0

#

Will try, thanks