#Bill Reynen

1 messages · Page 1 of 1 (latest)

cerulean narwhalBOT
rapid flame
#

So you need custom metadata on each individual transaction (Payment Intent object)?

median leaf
#

I need the same metadata on all the transactions for this one payment link. I do not need it to be custom per transaction.

rapid flame
#

Yeah unfortunately that's only doable through code at the moment

median leaf
#

so do I need code on my website to make use of the payment link or do I just need code to download the transaction details WITH the metdata after the transaction is completed?

rapid flame
#

You can use a payment link without code. The issue is the metadata piece. That's behavior that's generally used by folks who are coding/automating things, so that part will need to be done with code

median leaf
#

Thanks for the speedy reply. So the metadata I defined in the payment link is really stored somewhere in Stripe with each transaction and I need to use api calls to download the transactions WITH the metadata? Can you point me towards what API call that would be or what parameters I need to send to that call? Thanks

rapid flame
#

So when you set metadata on the payment link itself, that metadata is only stored on the payment link object. The individual transactions are separate API objects in Stripe, and we don't copy metadata across objects in Stripe

#

What's your use-case for having that metadata propagated to each individual transaction?

median leaf
#

thank you. My use case is that I intend to set up a handful of payment links. Each with different values for the same metadata fields. We are a non-profit and intend to use these links for donations. I would define two metadata fields. EFFORT_CODE and DESIGNATION (cause). Each payment link would have a value for EFFORT_CODE value and DESIGNATION value.

#

So at the very least I would need to know that the payment link identifier is stored with each credit card transaction.

rapid flame
#

Ah ok that makes sense. So the workaround here would be to listen for checkout.session.completed webhook events and then in your webhook handler code for those events, update the payment intent object with the metadata fields on the checkout session object (since metadata is carried over from the payment link object to the checkout session object: https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-metadata). When a customer visits the payment link, that creates a checkout session, which inherits the payment link's metadata

#

We have a feature-request that many folks have requested internally to automatically copy metadata from the payment link to the individual payments. Can I have your account ID so that I can add it to that feedback?

median leaf
#

Sure. Give me a minute to locate it

#

So is there a link in the transaction connecting it to the payment link?

rapid flame
#

No unfortunately not. You'll need to use that webhook approach I outlined above

median leaf
rapid flame
#

(That's not a stripe support link, but shows a fast way to get your id)

median leaf
#

got it. here it is: acct_1HpcXMB8pLhgPCcL

rapid flame
#

Thanks

median leaf
#

Thanks so much for your help today. This was very helpful

rapid flame
#

I'll add that to the feedback form for that request

median leaf
#

have anice day. bye

rapid flame
#

No problem! Same to you!