#hoffemberg_api
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- hoffemberg_lineitems-images, 4 days ago, 15 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1245400900596666378
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! Let me take a look at the requests you shared...
Those requests failed because you made them on your platform account, but the Customer doesn't exist there. The Customer in question exists on a connected account. You need to make the API request on the connected account instead. See here for details: https://docs.stripe.com/connect/authentication
I was just looking at my code again and was coming to that same conclusion. But for the API requests, where do I set that connected account id? For the invoice preview, is it in the InvoiceUpcomingParams?
Or the request builder?
There are code snippets on that page you can switch to the language you're using.
Sounds like you're using Java, right?
If so, it would be in the RequestOptions builder.
Yes. I think I got it. I just got the Customer.retrieve to work by setting the requestOptions and sending that as the second param.
Starting to get the hang of this api. Thanks for looking at it for me.
Happy to help!
One more thing while I've got you. In examining the invoice preview response, I see a url that looks like this:
/v1/invoices/upcoming/lines?invoice_items%5B0%5D%5Bdescription%5D\u003dService+Charge\u0026invoice_items%5B0%5D%5Bamount%5D\u003d2000\u0026invoice_items%5B0%5D%5Bcurrency%5D\u003dusd\u0026invoice_items%5B1%5D%5Bdescription%5D\u003dConsultation+Fee\u0026invoice_items%5B1%5D%5Bcurrency%5D\u003dusd\u0026invoice_items%5B1%5D%5Bamount%5D\u003d3000\u0026customer\u003dcus_QBvnOg6a1lRbE4
What is the actual url where the invoice preview is viewable? I tried adding https://stripe.connect.com at the front and got a 404.
What do you mean by viewable exactly? Like a PDF?
The URL you mention is for retrieving more line items for the upcoming Invoice if there are more to fetch, it's for use with the API.
Yes, like a pdf
Does the preview actually generate anything viewable by the client?
I don't think we create PDFs for preview or upcoming Invoices.
Typically people retrieve the information from the API and then display it in their own UI.
Does the actual invoice generate anything like a pdf?
No.
Err, wait.
The actual Invoice, once it's created and exists, does have a PDF, yes.
You can access it using the invoice_pdf property on the Invoice.
Preview/upcoming Invoices have that set to null I believe.
Cool. So with the actual invoice, there are two different calls to create the invoice and then to actually finalize it, correct? I could potentially display the pdf for the client's review from the create invoice response, and then finalize it with another action once our client approves?
You can do that, yes. When an Invoice is initially created it starts in Draft status: https://docs.stripe.com/invoicing/overview#invoice-lifecycle
However, it sounds like you might want to create a Quote instead: https://docs.stripe.com/quotes
It depends on your specific use case and which would work better for you.
Okay, I'll check out those references you sent and see which would work best. Thanks again!