#green-invoice-draft

1 messages · Page 1 of 1 (latest)

vapid bobcatBOT
unreal pewter
#

Hello 👋

  1. I display the invoice of the created subscription on my frontend page to show the user the detailed invoice before he confirms payment. I also want to allow the user to apply a promotion code. However, if I update the subscription with a promotion code, it does not update the invoice, and the doc says that we can't update an invoice with status open. How can I show the user the updated invoice? Do I have to create a new subscription with the promotion code?
    You can't update the invoice once it has been finalized and you can't prevent the initial invoice from finalizing. As a workaround, you can use Upcoming invoice API endpoint to preview a subscription invoice (before actually creating a subscription) and then collect the promo code before the subscription gets created.
    https://stripe.com/docs/api/invoices/upcoming
#
  1. If the customer has enough credit balance, the subscription becomes active as soon as the subscription is created. In my workflow, it means the user pays at the step 2, before checking the invoice and confirming the payment. Is it just a problem with my frontend, or is there a way to create the subscription with status incomplete even if the user has enough credit balance to purchase the product?
    The customer balance applies automatically to the next finalized invoice. It isn't a bug on your end. That's just how customer balance works.
    https://stripe.com/docs/invoicing/customer/balance#working-with-credit-balances

I don't think there's a way to prevent invoice from being paid automatically, checking..

#

I also had the feeling that I could create a draft invoice before creating the subscription. This could potentially solve both of the problems I'm having. However, I don't see how to create a draft invoice with a price or invoice_items in the doc: https://stripe.com/docs/api/invoices/create. Is it possible?
that won't be possible as the subscription creates its own invoice. You can't create an invoice prior to creating the subscription and then link it to the sub

vapid bobcatBOT
sour vortex
#

green-invoice-draft

green jungle
#

Thank you very much. I think I have all the answers I need. When a user applies a promotion code, I think I'm just gonna delete the incomplete subscription and create a new one, it's not a big deal. Thank you again, it helps me a lot, have a nice day!