#surbhi

1 messages · Page 1 of 1 (latest)

marsh ivyBOT
ivory hatch
#

If you scroll down a bit in the right pane, is the metadata in that hash that is getting cut off in that screenshot?

#

There are two places you can set metadata on a Checkout Session, one that sets it on the checkout session itself and one that sets it on the object that you are creating with the session

narrow notch
#

ok..thank u so much'

#

can i also get metadata in webhook?

ivory hatch
#

In that specific hash? Or just in general?

narrow notch
#

in that specific hash2

ivory hatch
#

Are you in subscription mode or payment mode here?

narrow notch
#

payment ..

ivory hatch
#

Are you creating a subscription or a one time payment?

narrow notch
#

one time payment

ivory hatch
#

Gotcha. Unfortunately I don't think the metadata from that can show up on the invoice metadata. Just the Checkout Session metadata or the payment intent's metadata if you set it through the payment_intent_data hash https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata

#

So to get it on the invoice you will need to manually set it by updating the invoice

narrow notch
#

as u see i have already set the metadata during chekcout session but when i check my webhoook its not there

ivory hatch
#

Can you send me the ID of that checkout Session (cs_test_123 or cs_live_123)?

#

And did you check the other metadata hashes on that event? It looks like that might be the one that is specifically on the payment intent

narrow notch
#

cs_live_a1FJXCGKaxVH0rrxphl1LZjCHHscBBB8cATDjw2t2OL1TeaZyVxvI0hhHj

ivory hatch
#
    OrderID: "2552245"
  },``` is set on the event itself
#

Try using ctrl+f and searching for "2552245", it is on that object, just in a different place

narrow notch
#

i dont see in webhook

#

that's my webhook response..i do not see metadata

ivory hatch
#

You will need to set the metadata in that argument to set it on the payment intent so that it shows up in the payment_intent.succeeded event

narrow notch
#

u mean to say, in order to get metadata in webhook i need to set metadata in a different way

ivory hatch
#

Basically, these are two separate (but related) objects. We don't automatically copy data between them so you need to explicitly set it like that.

#

Correct, for that specific webhook you need to set it on the payment intent, which you can do with that property that I linked to

narrow notch
#

ok.. i will try that..thank u