Best practices for sending money back out to the world vs keeping them in a separate reserved ledger account #1987
Replies: 1 comment
-
|
Hi, In short, you should model refunds as new counter transactions rather than using the reversal endpoint. A refund is its own business event with its own PSP reference, its own timing, often a partial amount, and sometimes its own fee semantics (refund fees, fee reversals, etc.). Capturing it as a fresh transaction preserves all of that context, whereas reverting collapses it into an undo of the original. For the rideshare flow specifically, modelling the refund as a new transaction that brings the relevant postings back from As for the reversal endpoint, it's better suited to cases where you genuinely want to undo a prior booking rather than represent a new business event. Broadly, that splits into:
So the choice between "counter transaction" vs. "reversal" really depends on whether the event you're recording is a new fact about your business (counter transaction) or a correction to a prior booking (reversal). I hope this helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been reading up on some of the Formance account modeling patterns here: https://docs.formance.com/modules/ledger/tutorial
I noticed that in the rideshare example the funds move from
driver:zz:mainback out to the world when the driver gets paid out - this makes sense since the money is leaving the system.What is the proper way of modeling the reversal of this flow when it comes to things like refunds? Is it best practice to bring money back in from the world? Alternatively is it recommended to just revert the transaction?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions