#ryan3358_invoice-metadata
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/1372631648268718120
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
As you can see the finalization of the invoice contains metadata, but the top right doesnt have it
Which is then present here in the webhook body
Hi ๐
How are you creating these Invoices?
JS library
Sorry that's not what I am asking. What API calls are you making to Stripe to create these Invoices?
const invoice = await stripe.invoices.create({
customer: customerId,
collection_method: "send_invoice",
description: bundleData.bundleName,
metadata: {
bundle_name: bundleData.bundleName,
bundle_id: bundleId,
bundle_approval_id: bundleApprovalId
},
application_fee_amount: X
days_until_due: 1,
lines: {}
}, {
stripeAccount: connectAccountId,
// apiKey: testMode ? STRIPE_PLATFORM_TEST_SECRET : STRIPE_PLATFORM_LIVE_SECRE });
Okay so the screenshot you shared shows that the Invoice has the metadata. But what webhook event are you listening for?
console logged bundleData, bundleId, bundleApporovalId prior so I know it has access to it in the method call
invoice.paid
Do you have an example event ID I could look at?
const invoice = await stripe.invoices.create({
customer: customerId,
collection_method: "send_invoice",
description: bundleData.bundleName,
metadata: {
bundle_name: bundleData.bundleName,
bundle_id: bundleId,
bundle_approval_id: bundleApprovalId
},
application_fee_amount: 3750, // DO THE PRORATING LATER
days_until_due: 1,
lines: {}
}, {
stripeAccount: connectAccountId,
// apiKey: testMode ? STRIPE_PLATFORM_TEST_SECRET : STRIPE_PLATFORM_LIVE_SECRET
});
sorry
evt_1RNiGwIG0PHzRMlg219zEgad
Thanks, taking a look
evt_1RP5jOIG0PHzRMlgLDwPEXfB
The metadata property on Invoice in_1RNiDNIG0PHzRMlgrSup4FoW from event evt_1RNiGwIG0PHzRMlg219zEgad is empty.
I see a lot of update requests. Did it get unset at some point?
Oh wait, metadata was never set on this invoice
Here is the creation request: https://dashboard.stripe.com/logs/req_soC9t2ZpEk6qEi
For evt_1RP5jOIG0PHzRMlgLDwPEXfB, the Invoice does have metadata
But that event is an invoice.finalized event, not invoice.paid