#bennn
1 messages · Page 1 of 1 (latest)
Do you have the Invoice Id? inv_xxx
is it safe to share here?
ok one seci ll get it
Yeah looking. One moment
thanks
Okie somehow that Invoice is $0 and it didn't pick up the previous Invoice Item
oh
thats not good
oh i think i see the problewm
invoice_item = stripe.InvoiceItem.create(
customer=customer.id,
price="price_1MrC5ZDFiZUD1t6WtR2ughZA", # Replace with your Stripe price ID
)
invoice = stripe.Invoice.create(
customer=customer.id,
auto_advance=True,
)```
the second line here is wrong right?
bc it doesnt include any items
If invoice items are created before an invoice is created, set the pending_invoice_items_behavior to include when creating the invoice so that all pending invoice items are automatically added to the invoice. In this case, only add invoice items to a single customer at a time to avoid adding them to the wrong customer.
okay thanks
ill do it the way they do in the example
invoice_item = stripe.InvoiceItem.create(
customer=customer.id,
price="price_1MrC5ZDFiZUD1t6WtR2ughZA", # Replace with your Stripe price ID
)
invoice = stripe.Invoice.create(
customer=customer.id,
auto_advance=True,
pending_invoice_items_behavior="include",
)```
so the invoice works now
the item is added
but its still a draft so the url doesnt exist
isnt auto_advance=True supposed to automatically finalize it?
I want to avoid emailing the customer, rather send the link via discord
auto_advance=true will finalize it after a while. It's not immediate. Do you have the invoice id? I can take a quick look
was able to fix with this ```py
finalised_invoice = stripe.Invoice.finalize_invoice(invoice.id)
thanks for the help
also not rlly related to the api
but stripe seems to be really buggy on macos safari lately
u kniow anything abt that?
like half the time pages fail to load and i cant even open these invoices, have to send them to my phone