#sateeshmadagoni_63774
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- sateesh-retroactive-invoice-pdf, 15 hours ago, 16 messages
subscription_data: { metadata: { plan_type: planType, billing_period: billingPeriod, organization_id: req.organization._id, }, },
Which metadata parameter(s) are you using on your Checkout Session creation?
Hmm, it should be included in this hash on the invoice.paid event: https://stripe.com/docs/api/invoices/object#invoice_object-subscription_details-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This is always empty.
Can you paste either the evt_xxx ID or that sub_xxx ID
sub_1OUpaXE4YflY2cbLL8QWN6a5
That Subscription was generated via this Checkout Session: https://dashboard.stripe.com/test/logs/req_M9rUKmDUGQfYrL
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I don't see the subscription_data[metadata] parameter in your request
But I am adding it like this
mode: "subscription", cancel_url: ${process.env.APP_URL}/, success_url: ${process.env.APP_URL}/payment-success?checkoutId={CHECKOUT_SESSION_ID}, metadata: { plan_type: planType, billing_period: billingPeriod, organization_id: req.organization._id, }, subscription_data: { metadata: { plan_type: planType, billing_period: billingPeriod, organization_id: req.organization._id, }, },
Do I have to stringify it ?
Ok my bad! the values were empty.
Yep, the SDK will remove any nullish values from the payload
So this values will be carried for every payment for that subscription right ?
The subscription_details[metadata] field on the invoice will be a snapshot of key/values on the subscription at the time the invoice is generated, yes
theyll be present on https://stripe.com/docs/api/invoices/object#invoice_object-subscription_details-metadata yes