I've read on the Ripple Wiki page for Transactions about partial payments. I am wondering how a partial payment would look when data is polled about an account? Would the transaction amount be displayed as what the payment was attempted to be sent, or the amount that actually went through? Are there any examples of how partial payments look and how they should be handled by Gateways?
1 Answer
It's the choice of whatever is doing the display how it wants to display the information the Ripple network provides.
The original transaction is provided. This contains the source account, the destination account, the maximum amount the transaction could pay (the "destination amount"), the maximum amount the sender was willing to pay (the "send maximum"), and an indication that partial payments were allowed (the "partial payment" flag).
In addition, the transaction metadata is provided. This contains the transaction result code which, if not success, indicates no payment at all was made. If the payment was able to be made completely, no "DeliveredAmount" field will be present in the metadata, indicating that the destination amount was in fact delivered to the destination. If the payment was in fact a partial payment, a "DeliveredAmount" field will be present, indicating the amount paid to the destination.
The metadata also contains the other consequences of the transaction. This would include reducing the balance of the sender, crediting and debiting market makers involves in the transaction, reducing or removing offers the payment used, and so on.
Some gateways do not credit partial payments automatically. It is not a good idea to make a partial payment unless there's a good reason to do so and you know the recipient wants or expects partial payments.
-
Are there any examples of partial payments on the ledger that I can look into for reference? Commented Jul 13, 2014 at 19:37
-
197429972960F0090B701FD39D9678167D4F478B3D05DDAFAFA53385770BAB882 -- Notice the DeliveredAmount field and the Flags field. Commented Jul 14, 2014 at 2:31