#Wik
1 messages ยท Page 1 of 1 (latest)
hi, do you have the ID of the Subscription sub_xxx you deleted(or the customer ID cus_xxx) so I can get up to speed on the context?
cus_MVccPOvnvyMG4a
well what happened was
- you deleted the subscription
- that generated a final invoice in_1LmbOL2ljWhzB31VqCHNp9ok for the prorated amount left
- that invoice was charged to the customer
- you issued a credit note to refund that payment
so there's no leftover balance.
Give me a second please
I could be misunderstanding, unfortunately it's hard to understand since I think you did a bunch of things all at once(created the subscription, deleted it, made a credit note, all within a minute)
Your app is too fast ๐
But I have to admit I was cheating and I used the dashboard to test
Now I've done things through API
cus_MVcyg0MmHQQu8T
yep so you cancelled the subscription with proration enabled
yes
that generates a "floating invoice item" for the proration
so the money is not returned to the customer, but their next invoice will be lower by the amount on the "floating invoice item", right?
But it's not the same as credit balance?
that is not added to the customer's balance directly. For that to happen, an invoice has to be issued, which will pull in that negative item, and apply it. If the amount of that invoice ends up being negative in total, that negative amount is added to the customer's balance when the invoice is paid
that's why often you use invoice_now in that Delete call as well
right
the credit balance will update when an invoice that has an overall negative amount is "paid"
if I do invoice now, will it affect anything other than the balance?
well for example it might pull in other pending invoice items for that customer, if they happen to have them
not sure what else you're thinking could be affected but that's the only thing that comes to my mind
got it
is it possible to transfer the "floating invoice item" (BTW what's the proper term used in your documentation? credit note?) between customers?
I'm asking as we're looking into consolidating our two Stripe accounts. We're aware Stripe will do some things for us, but we need to move active subscriptions on our own.
We're thining about canceling a subscription in account A, transfering the balance and creating the same subscription in account B.
Due to that, I wonder if
- it's possible to transfer the "floating invoice item" or
- if we can ensure in some way that all "floating invoice items" connected with a customer are, hm... "activated" (they became the credit balance) and move them then
not possible to move it, no. You could maybe manually delete the item from one customer and manually create one on a different customer for the same amount.(https://stripe.com/docs/api/invoiceitems/create)
In our docs I think we call these "pending invoice items". It's not at all the same thing as a credit note
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
not sure what that means
if you have pending invoice items and you want to charge them , you have to create an Invoice
How can I check via API if I have any pending invoices?
pending invoice items
you'd call https://stripe.com/docs/api/invoiceitems/list#list_invoiceitems-customer to check for them
if you have some, then you can call https://stripe.com/docs/api/invoices/create to invoice for them. Note that https://stripe.com/docs/api/invoices/create#create_invoice-pending_invoice_items_behavior exists, we changed the behaviour in a recent API version to not include the pending items by default so you might have to use that.
Got it. When I create an invoice, it's going to be a draft and as long as it's a draft, the credits will not be added.
How to bring it out of draft? Normally, I'd invoice.pay but not sure if it's correct for this
invoice.finalize