#k_search-metadata

1 messages ยท Page 1 of 1 (latest)

thorny topazBOT
#

๐Ÿ‘‹ 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.

stuck kelp
#

k_search-metadata

signal vault
#

hey

stuck kelp
#

@signal vault did you have a follow up question or are you all set?

signal vault
#

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?

stuck kelp
#

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

signal vault
#

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

stuck kelp
#

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

signal vault
#

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

stuck kelp
#

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).

signal vault
#

ok lets simplify

#

how do I get the metadata from the webhook event that was assigned in its respective payment link

stuck kelp
#

Can you give me a concrete example with an exact Event id for me to look at?

signal vault
#

event id 'evt_1Q5Ei6P35cTGtYcykXxm5AYT'

stuck kelp
#

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

signal vault
#

where can I get the metadata from the payment link?

stuck kelp
#

you can't/it doesn't make sense to do that

signal vault
#

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

stuck kelp
#

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

  1. Your Subscription has no metadata (which is partly why you weren't finding it)
  2. 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)

signal vault
#

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

stuck kelp
#

I'm sorry but I don't see how that responds to any of what I said ๐Ÿ˜ฆ

signal vault
#

hmm very it seems we cant get on the same page, I kindly requests to switch to a new associate

stuck kelp
#

That's not how it works ๐Ÿ˜…

signal vault
#

oh ok very well then