#mark-a_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1308557702426791985
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Howdy
Let's see, it should be possible to add metadata to an inline Price though it looks like we flag this in our docs as a preview feature: https://docs.stripe.com/api/invoiceitems/create#create_invoiceitem-price_data-metadata
With dot net, I thin you'll need to use AddExtraParam , as documented here: https://github.com/stripe/stripe-dotnet?tab=readme-ov-file#how-to-use-undocumented-parameters-and-properties
OK, excellent. I'll try that. Thank you.
Sure thing!
I'm not seeing an AddExtraParam option on the InvoiceItemPriceDataOptions. Is it someplace else? Also, the link you first pasted above (https://docs.stripe.com/api/invoiceitems/create#create_invoiceitem-price_data-metadata) briefly goes to the invoice item create section of the API docs, then within less than a second jumps to the beginning of the docs, as if the anchor is invalid or something. I'm using .net v47.0.0 and v2024-10-28.acacia for webhooks in our Test env.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I updated the link above: https://docs.stripe.com/api/invoiceitems/create#create_invoiceitem-price_data-metadata
Same thing. It jumps back to start of API docs. No data on invoice item price data metadata.
Might I be seeing different API docs based on our Live version of API, etc.?
Ohh I see what you mean
Okay, so it looks like this functionality (adding metadata on an inline price) isn't available yet
Bummer. Going to have to rethink this whole thing of inline prices. Any work-arounds?
You can split this up into two: create the Price (with metadata) first, then create the InvoiceItem and use price instead of price_data
This is for free-form Amounts, which seem to only be available with inline price or customer-chooses-price, which has other limitations.
Only other option I can think of is to retrieve the used inline price after the fact and assign metadata then, if at all possible.
Oh, or I gues I could create a one-off price wiht current amount.
Hm, let me test that out. Inline price data is used to create a Price object but that Price object is automatically archived
Yep, that's right
ok, I'll try working with one of those options. Thank you.
One-off price seems like probably the best option here. Do you know if/when the ability to add the metadata there might be available? Seems like an oversight, as it's valid data in the Price object.
I tested trying to add metadata to an inline price but received an error. since inline prices area automatically archived, they can't be updated after the fact
OK, I'll go with the one-off price.
This is something else to keep in mind if you ever needed/wanted to update metadata on those inline prices; you won't be able to
Yep, OK. Thanks.
I recommend reaching out to our Support team about inline price metadata in case there's anything else they can share: https://support.stripe.com/contact/