#TMO
1 messages ยท Page 1 of 1 (latest)
Hey
Can I do this or do I just spin up a new payment link each time I need to attach metadat?
Hello ๐
What's the usecase here exactly?
So I want to use payment links for subscriptions, I need to attach an identifier to each subscription so I can retrieve it later using the search api
It's possible for my users to delete their accounts on my side, so I need a way to re-check if they already have an active subscription if they come back.
Should I just spin up new payment links?
It just seemed wasteful
I don't want to spam payment links, I'll need a new one for every single customer, is this ok/
I am a bit confused with how you'd check if they have an active subscription exactly after passing the metadata?
Using the search api
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
what are you planning to add into metadata?
it's a place_id from a Google Business
It looks like the client reference ID is how we recommend tracking payments from payment links https://stripe.com/docs/payment-links/url-parameters#streamline-reconciliation-with-a-url-parameter
It wouldn't automatically go on the subscription but you could listen for the checkout.session.completed event and use it to add the reference ID to the subscription's metadata
There's no way do just do this on the fly? Just straight up pass metadata into the payment link have it attach to the subscription automatically?
Unfortunately not
Those wouldn't transfer to the subscription. So you can use them but you would also have to listen for an event and copy them over with the API
I'm guessing this is a payment links limitation, should I just use the low-code stripe checkout option instead?
I assume I can pass metadata via the checkout session directly into the meta data there
for a subscription
Yes for Checkout you can definitely do this. There is a subscription_data parameter that you can pass metadata in to when creating a Checkout Session and that metadata will be set on the subscription automatically