#ulrikeskygate

1 messages · Page 1 of 1 (latest)

amber scaffoldBOT
rose seal
#

Hi
Could you please share an Invoice Id ?

oak haven
#

Hi

#

in_1Nha9PCptbWmAJMvTkfq6KWJ

rose seal
#

But, you need to make another API call

Is there a more elegant way than calling the products API for each one?

#

Did you tried the invoiceitem API and expanding price.product field ?

#

This API in particular

oak haven
#

That would also need a second API call.
I'm currently calling the invoices API to create a list for the user in our frontend. I was hoping I could retreive all the needed information in one fell swoop. If need be I can make a second call and maybe cache the result somewhere on our end.

The lines list items do have a metadata property. Since it seems to not be the product's metadata, is there a way to provide values for this property during creation of the checkout session's line items?

rose seal
#

That would also need a second API call.
Yes you need to make another API call for this usecase

oak haven
#

I'm aware, and I added other metadata there. I could add a list of product metadata here, but it seems a bit hacky. How do I get data into this array during the CheckoutSession creation:

rose seal
#

No you can't via Checkout Session

#

You can use Stripe Invoicing APIs directly

oak haven
#

I assume, since we use the hosted Checkout currently and payment should be instant without an amount due, changing the invoices after the fact to add metadata will be blocked, no?

I think I'll just add the second API call. Should be fine. Stripe does not charge for API calls other than the Tax calculation API, right?

rose seal
#

I think I'll just add the second API call. Should be fine. Stripe does not charge for API calls other than the Tax calculation API, right?
No, there'll be no cost for API calls

oak haven