#bicoumour
1 messages · Page 1 of 1 (latest)
Can you share an example payment ID please? pi_xxx?
sure
pi_3NLxyzH78j76CqqC1LPoNin1
no forget about the last one
this one is: pi_3NLXn4H78j76CqqC02atGIdV
I can find my metadata If I open the payment and deep dive into it
But If I try to export all the payments, I don't see how I can add my metadata in the export
It's because the metadata set on the Payment Link is only persisted to the Checkout Session (which is the object in your screenshot), but not the Payment Intent/Charge (which is what is exported)
This is a current limitation, you can't automatically persist metdata from a PL to the underlying payment unfortunately
What you'd need to do is update the metadata on the associated payment after the Checkout Session completes, probably in a webhook
Ok. So payments are kind of useless, aren't they?
Not sure what you mean?
I want to monitor the payments I receive from my clients to update their status / their debt.
I send them links for them to pay us what they owe. But of course I need to keep track of their actions to act accordingly.
Until now I was looking at the payments with Status ="Paid". But I couldn't easily export all the payments and link them to my clients.
What I understand from what you're telling me is that I won't be able to link these payments thanks to my metadata.
My metada is only persisted to checkout sessions. Therefore I understand that I should stop looking at the payments and focus on the checkout sessions. Is that it?
The checkout session with payment_status = "paid" I suppose.
Yes, general recommendation is to use checkout.session.completed events to handle fulfilment