#irisy
1 messages · Page 1 of 1 (latest)
Hello!
Okay let's go one by one
1/ Yes a refund here is appropriate and you could set metadata on the refund here when you create it to reference the Invoice ID
Ok, so it is correct that the original invoice is just left in Paid status
In all cases the invoice will be left paid here since this is post-payment.
For 2/ are you looking to charge immediately? Or you want a credit note to be added to a future invoice that they might pay?
I assume immediately
But want to confirm
Not immediately actually - the user would be presented with the new invoice 'automatically' on their side but we could have a lot of different users under the same organization ID, so don't want payments to apply to invoices automatically. Unless you don't think that's a concern?
Hmm I'm not sure I understand that statement fully. So the customer has paid the initial invoice, then there is a price increase -- do you plan to invoice for that price increase immediately?
Yes
Okay thanks
So really you wouldn't use a credit note here... that is for decreasing the amount on a finalized but unpaid invoice.
Instead, you want to use an invoice item
So you create an invoice item for the increased amount (https://stripe.com/docs/api/invoiceitems/create) and then you create a new Invoice
You can link these together once again using metadata
Yep basically like associate invoice 1 and 2 so that you know invoice 2 was related to an increase in price for invoice 1 and not just a whole new invoice for a new product
Can you elaborate more on your third question above?
Yes, so for the user who is able to 'edit' the paid invoice, we basically want to surface a modal to them where they can see how the price will change so they can confirm they really want to make the change.
I think including the difference in line items and price will be helpful to show, but we currently don't store that data (only an invoice ID and total amount).
Got it, you want to use https://stripe.com/docs/api/invoices/upcoming to be able to show the Customer exactly what the Price change will entail
This Upcoming Invoice endpoint will give you full details on what will happen if you create a new invoice with an invoice item
You can send the data pieces you want to the frontend to display in your UI for your customer
Awesome!!
So to show the difference in line items in the UI, we do need to have stored the individual invoice line items from the original invoice as well. Then we can calculate the difference between Original and Upcoming?
if you could confirm that, that just about wraps up my questions. 🙂
If you want to show the total amount then yes you would want to pass the amount from the original invoice to the frontend as well. Otherwise, you could show just the price increase via the Upcoming Invoice endpoint.
But yeah, overall, you got it. You likely want to be passing all of this data to the frontend to craft your UI in a way that is intuitive for your customer
ok, thanks a lot!!
Happy to help!