#TMO

1 messages ยท Page 1 of 1 (latest)

ruby tangleBOT
mint harness
#

Hey

#

Can I do this or do I just spin up a new payment link each time I need to attach metadat?

kind hawk
#

Hello ๐Ÿ‘‹
What's the usecase here exactly?

mint harness
#

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/

kind hawk
#

I am a bit confused with how you'd check if they have an active subscription exactly after passing the metadata?

ruby tangleBOT
mint harness
#

Using the search api

kind hawk
#

what are you planning to add into metadata?

mint harness
#

it's a place_id from a Google Business

signal garnet
#

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

mint harness
#

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?

signal garnet
#

Unfortunately not

mint harness
#

Hmm ok

#

What about custom fields, any way to use those as hidden fields?

signal garnet
#

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

mint harness
#

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

signal garnet
#

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

mint harness
#

Amazing

#

Last question

#

Nevermind, got it!

#

Thanks for your help

ruby tangleBOT