I am building an app that manages customers and their orders, especially customers with pending payments. I am trying to make payments via the REST API. When some order is partially paid, then there is a transaction for that order already. This allows me to get the parent_id and make a new transaction as payment of the pending amount.
However, when some order is pending without any partial payment, then there is no transaction associated, thus no parent_id. In this case, how am I supposed to do the payment via the REST API?This is the transaction JSON I am creating for the POST request: