#alexv_api

1 messages ยท Page 1 of 1 (latest)

quiet gobletBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1304072358226563184

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

round pike
#

hi there!

ionic hazel
#

hi soma!

round pike
#

that's normal. if you set metadata, then the metadata is set on the Checkout Session object itself. not the payment or the subscription.

#

so your goal is to add the metadata on the subscription object?

ionic hazel
#

ooh! ok! sorry for my lack of knowledge

round pike
#

or on the individual payments of the subscription?

ionic hazel
#

I don't know where to set it, basically I want customers from our app to go and pay on stripe. I want to be able to track them and see if they made this purchase. So I'm not 100% sure on which action should I attach the metadata on.

#

I am not 100% sure if the client will use subscriptions or one time payments, I'm trying to learn and be ready for both cases.

round pike
#

where in the dashboard are you looking for the metadata? on the Subscription, Invoice, Payment, Customer, etc.?

#

I am not 100% sure if the client will use subscriptions or one time payments, I'm trying to learn and be ready for both cases.
then you probabbly want the metadata on the PaymentIntent object itself

ionic hazel
#

I'm currently checking under Transactions

#

You are correct! under subscriptions I do see the metadata used in "payment_intent_data.metadata" ๐Ÿ˜„ !

round pike
#

once you have the metadata on the Subscription object, it will be automatically added to the Invoice. but not on the payment itself. so you will need to write some code to copy the metadata from the invoice to the payment. or direcyt check the invoice to see the metadata.

ionic hazel
#

thank you so much soma!

round pike
#

happy to help ๐Ÿ™‚

ionic hazel
#

thank you! can I run one more idea by you? if you have time?

round pike
#

absolutely!

quiet gobletBOT
ionic hazel
#

so in my case, where I want to track customers that buy subscriptions, would it be better if I set the metadata directly on the customer in order to be able to map them to my backend? and then for the payment status, I would get those updates through webhooks (where I update my local data if their subscriptions are active, canceled or not paid)?

heavy ridge
ionic hazel
#

alright, that sounds great, I'll research and test on my end, thank you very much!

#

One last question: we use Auth0 to authenticate our users, I saw Auth0 has an integration with Stripe but what I'd need ideally is: when a user is redirected to Stripe from our app (where he is logged in), would we be able to get his Auth0 id (any id from their token) so we can map the users that way?

heavy ridge
#

I'm not really familiar with any integration Auth0 might have but in general yes you will have "something" somewhere that maps a user in your system to their Stripe Customer ID cus_xxx