#Linups
1 messages · Page 1 of 1 (latest)
Hey, sorry for the delay here
That looks like a Checkout Session parameter, is that right?
When you say 'recurring transactions', which API objects do you mean? The related invoice? A specific event?
the perfect would be to see metadata in upcomming charge.succeeded events.
then webhook parser could read and do certain actions on recurring charges.
But you're using Checkout Sessions, yes?
one moment, i will check.
$subscription = $this->stripe->subscriptions->create([
'customer' => $customer->id,
'items' => [
['price' => $subscriptionID],
],
]);
not sure, but probably you know from code.
Ok, so you're passing metadata to that method not subscription_data[metadata]?
im not passing yet. but i need to pass and be sure that it will show up in all recurring charges.
AFAIK metadata is passed to the underlying invoices on this field: 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.
I'm fairly sure it's not set on underlying payment/charge so wouldn't be in charge.succeeded events
You should really be using invoice.paid events for recurring payments anyway: https://stripe.com/docs/billing/subscriptions/webhooks#active-subscriptions
Should be easy enough for you to test this to confirm
thank you, i will check it.