With the current version of the API, it’s not possible to fetch the underlying payment of a payment link.
I need to store such a payment in our database for accounting reasons, but this functionality is not provided. The only workaround I could find is to set a unique description to the payment link, which will be the description of the underlying payment. Then I have to go through all the payments until I find the one with the same description as the payment link.
This is brutal and sometimes leads to timeouts.
Am I doing anything wrong here? Is there another way of fetching the payment?
Specifications
Describe the issue
With the current version of the API, it’s not possible to fetch the underlying payment of a payment link.
I need to store such a payment in our database for accounting reasons, but this functionality is not provided. The only workaround I could find is to set a unique description to the payment link, which will be the description of the underlying payment. Then I have to go through all the payments until I find the one with the same description as the payment link.
This is brutal and sometimes leads to timeouts.
Am I doing anything wrong here? Is there another way of fetching the payment?