#rogue_ram

1 messages · Page 1 of 1 (latest)

signal spireBOT
cyan stream
lament berry
cyan stream
#

Yup! That's fine

lament berry
#

req_4Xv4hzfOdJJJvb

cyan stream
lament berry
#

which it relies on to complete the request

cyan stream
#

I see! Metadata on an object doesn't get populated to the different object. In this case, your metadata is set on the Customer object and it won't be populated in Invoice object like the one in evt_1NOZV8Dn9VRyIkutKd35mKwp

#

This is expected

#

Stripe doesn't populate metadata from one object to another

lament berry
#

Ohh okay, that makes sense. If i were to get the customer object after the payment was completed could i extract the user_id from there?

#

(sorry for misunderstanding)

cyan stream
#

It's possible to get customer from the Invoice object, which you can make additional Customer retrieval request to get the user_id set on Customer object. However, it'll introduce more requests to Stripe. I'd recommend storing the customer ID to your own user ID in your own database and map it from your own database instead of making additional requests.

lament berry