#m3taphysics
1 messages ยท Page 1 of 1 (latest)
The checkout.session.completed event payloads shouldn't differ depending on integration flow. Can you share some evt_xxx IDs where you believe there's differences?
Thats what I assumed too, evt_1LvHNSAg0uf2129HbyqZugOG
this was testing with the stripe cli, on localhost
What am I comparing it to? This looks normal to me (there's no line_item field)
Let me find one
evt_1Ltpm2DTjW7907RAZ8W5MW32
This is from our live integration, that uses stripe checkout. Notice the metadata field
Sure that just reflects the metadata you passed on creation of the Checkout Session here: https://dashboard.stripe.com/logs/req_g1n2FdHW1XNEt4
We don't automatically set that.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Nor can you pass the metadata parameter via pricing table to the underlying Checkout Session
Hmm, but on the stripe dashboard each product has a key-value list of metadata items?
example:
prod_JDbc8orMnNU9JU
Is the desire to have access to the line_items data on the checkout.session.completed event?
That's completely unrelated
Oh, sorry
What is it you're trying to do that the webhook 'differences' prevent?
You are totally correct, on checkout creation we assign the metadata, but we retrieve that from the product itself
Sorry for wasting your time
I guess we have no control over the session itself with embedded stripe tables?
๐
Two things are desired:
-
Create the stripe checkout process with our existing stripe customer ID's (we can get around this though..)
-
Retrieve product and quantity information. I guess this can be done using the subscription ID? I guess this is what you refer to as line_items
Create the stripe checkout process with our existing stripe customer ID's (we can get around this though..)
Not possible right now with the pricing table, if that's what you mean.
Retrieve product and quantity information. I guess this can be done using the subscription ID? I guess this is what you refer to as line_items
Yes! Instead of settingmetadataon the Checkout Session that reflects your product data you can get this from the Checkout Session object:
- In your webhook handler, make an additional request to retrieve the session's line items: https://stripe.com/docs/api/checkout/sessions/line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The reason why they're not included by default is that line_items is an expandable field, and they're not included in webhook events: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Awesome thanks for this, great help.
So one final question - currently I generate an associated stripe customer ID on account creation. If the embedded tables never receive this how is the association made on stripes side between the customer and the new subscription?
Becuase this would imply there are unassociated subscriptions created for a user and it wouldn't be easy to track with the metrics in stripe?
If the embedded tables never receive this how is the association made on stripes side between the customer and the new subscription?
It isn't, the pricing table session would just create a new Customer object
Ok that is what I assumed, urgh. Ill go back to the team and tell them the news
Is this planned?
It's something that's top of mind of us yes, but there's nothing to share right now
of course, np!