#ggmghoul
1 messages · Page 1 of 1 (latest)
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Are there any pending Invoice Items for that Customer?
Or do you want an empty invoice?
i want just to create a new invoice for this customer to use the external url in an email
that's the only way i found
i tried checkout session it expires after 24hours
paymemetlink can't add a specific customer
so the invoice works fine i get to insert a customer and a price and due date
You need to pass pending_invoice_items_behavior: 'exclude' when creating then: https://stripe.com/docs/api/invoices/create#create_invoice-pending_invoice_items_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
To be clear you need to add items to the invoice for it to actually collect payment
Otherwise you'll just have an empty invoice
can you explain to me what happened with the failed request pls ?
i would like to understand the situation not only fix it xD
The error is pretty verbose, no? You're trying to create a new Invoice for a specific Customer (cus_MfltDgdQPNO7Oa) who doesn't have any pending items for the invoice the 'collect'
The default behaviour is for the invoice to pick up any pending items from that customer
okay so when we create an invoice it will automatically contain any pending ones items for that customer ?
unless we exclude that default property ofc right ?
nice , thanks for the info that might come in handy someday
and i read your message about the items
yes i already did it the stopping point was on never generating an invoice which is resolved now as you said
thank you
np
just one more thing if i may
would i obtain that external url for the invoice to pay from the creation response ?
i saw that i can use stripe to send an email with creation but i want to sent it in a customized email as it already exists i only need the link
No, only when you finalise the Invoice
okay in that case i think after the creation i have to finalize the invoice and that would do the trick ?
You'll need to make sure your invoice has line items before you finalise, otherwise it'll fail
yes i already verified that
Should work then! hosted_invoice_url field will have your URL on finalisation response
np