blnkfinance / blnk

Blnk is an open-source financial ledger server that enables you build financial products easily.
https://docs.blnkfinance.com
Apache License 2.0
31 stars 10 forks source link

Add rollback to a voided transaction #42

Closed devton closed 1 month ago

devton commented 1 month ago

Is your feature request related to a problem? Please describe. Some times our application can void a transaction after an expiration date in application, but sometimes the company can receive a late payment from a txn that was voided (we void a transaction also to dont keep a pending balance forever)

Describe the solution you'd like We can add a status rollback on inflight transactions that was voided and the recreate the transaction to be void or commit again

Describe alternatives you've considered For now I'm not voiding the transactions but subtracting the value from the payments expired on my database with the inflight balance

jerry-enebeli commented 1 month ago

This is an interesting and valid use case. Let me think it through some more and maybe consider how this is possible with the current version. Thank you @devton.

jerry-enebeli commented 1 month ago

Hi @devton, I've merged a fix to the main branch. I will be releasing version 0.6.5 this week, which includes other fixes. To solve your issue of an inflight roll back use the rufund endpoint(i'll document and share soon). When the refund endpoint is called it'll perform the rollback to in-flight if it has been voided.

Thank you for the insight.