#k_search-metadata
1 messages ยท Page 1 of 1 (latest)
๐ 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/1290784312916054158
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
k_search-metadata
@signal vault you want to look at our Search API: https://docs.stripe.com/search
hey
@signal vault did you have a follow up question or are you all set?
yeah so when I create a payment with the payment link I can store and retrieve metadata from that payment link when it comes up as a subscription in the api?
That sentence doesn't really make sense to me. No one "creates a payment" if you use PaymentLink. I'm sorry this is really confusing and is quite different from your earlier question
If you, as a developer, set the right metadata on the Subscription then you can use the Search API to look for the right Subscription
sorry paymentlink
its all related because I am trying to create a flow where the primary user id can be attached to objects
I want to make a subscription for a user but we are using an external(primary) auth system, so I need to associate and search for the users things based on that user id in the metadata
If you are using PaymentLink, it means one URL can be used by many different end customers to start a new Subscription. So you can't really write code to customize the metadata for each one, so it doesn't really make sense the way you framed it yet
welll were going to disregard the customer id, when the user purchases the subscription the paymentLink should have the same metadata of which we can view on any of the subscription webhooks
on the payload itself or from ```Subscription.retrieve
Plan.retrieve
I'm sorry I really don't understand you at all right now ๐ฆ
It seems you're mixing up the concept of metadata which we document here https://docs.stripe.com/metadata with our Plan API which is unrelated (and also deprecated and replaced with the Price API instead).
ok lets simplify
how do I get the metadata from the webhook event that was assigned in its respective payment link
Can you give me a concrete example with an exact Event id for me to look at?
event id 'evt_1Q5Ei6P35cTGtYcykXxm5AYT'
Okay pefect. So that Event is about a Subscription that has no metadata on it. So there's nothing to look at or retrieve. Its metadata property is empty
where can I get the metadata from the payment link?
you can't/it doesn't make sense to do that
I highly recommend pausing and taking the time to carefully read https://docs.stripe.com/metadata as you are getting confused about how metadata even works
If you want the Subscription to have metadata then you need to set https://docs.stripe.com/api/payment-link/create#create_payment_link-subscription_data-metadata on the PaymentLink. That will in turn add that specific metadata to the resulting Subscription(s) the PaymentLink creates
I understand your frustration and I know it can be stressful when people dont seem smart enough. my thing is that im coming from shopify and it was a nightmare no reliable subscription solutions. I wish I had the capacity to take time but I don't I know its sounds stupid but thats my reality
All good, it's not that I'm frustrated and more that if you don't take the time to digest some of the information, you're only going to understand it on the surface and it won't add up the next time you look, or when you try to figure out how to look at this on the Invoice Events, or the PaymentIntent.
Investing a few minutes right now to grasp how it works overall and testing it a few times in Test mode will help you deeply understand this, and then apply this to the next API you try to use with Stripe
So right now, with the concrete example you gave me, we now know that
- Your Subscription has no
metadata(which is partly why you weren't finding it) - You do use PaymentLinks (you'd be surprised how often people use the word "payment link" to just mean their own URL where they built their payment form ๐
) and that PaymentLink does have
metadata(which I confirmed internally)
It still doesn't really make sense to me that you would be using PaymentLinks here. Those are supposed to be reusable. So it means the same URL can be paid by different humans. And you likely want each to have a different "firebase id" or whatever that info is that you put in the metadata.
My guess is that you are creating "one-time use PaymentLinks" as a quick way to give access to a payment page for each individual end customer. That is uncommon and not the normal integration path)
well I have an extension, and I cant trust any input from the client, to keep our system secure the access token must be sent to the api, the api uses the access token to extract user id and other user info for that authenticated user
the system can only rely on the data from the access token and the given user id in stripe object metadata, relying on url from redirects is dangerous
I'm sorry but I don't see how that responds to any of what I said ๐ฆ
hmm very it seems we cant get on the same page, I kindly requests to switch to a new associate
That's not how it works ๐
If you prefer to talk to someone else, please contact our support team and they can help you 1:1: https://support.stripe.com/contact
oh ok very well then