
A payment they can claim
XRPL Checks let you create a payment that the intended recipient can cash later. Give recipients flexibility over when to collect.
Kev orders a tray of pastries for the night market. The baker wants to collect the 20 XRP after closing, so Kev creates an XRPL Check addressed to the baker’s account. The Check goes on the ledger straight away. The XRP moves when the baker successfully cashes it.
A quick note from Kev: We spell it cheque here in Australia. The XRP Ledger calls it a Check, so Kev’s letting that one through to the keeper.
How does an XRPL Check work?
Kev submits a CheckCreate transaction that names the baker’s account and sets the maximum he’s authorising, 20 XRP. He can also set an expiry. When the baker is ready, they submit a CheckCash transaction using the Check’s ID. Only the account Kev named can cash it.
What if Kev has spent some of the XRP?
The 20 XRP stays available for Kev to spend until the Check is cashed. If the baker asks for exactly 20 XRP and Kev has only 12 XRP available to spend, the attempt fails. The baker can try again once Kev has enough, as long as the Check is still valid. The baker can also choose a flexible cash and set a minimum. With a minimum of 10 XRP and only 12 XRP available, the baker would receive 12 XRP. Cashing the Check successfully uses it up, so the remaining 8 XRP would need a separate payment.
Can a Check be cancelled?
Kev or the baker can cancel an uncashed Check. If Kev set an expiry and it passes, the baker can no longer cash it and anyone can remove the expired Check from the ledger. Cancelling it ends the authorisation without moving the payment funds.
Kev’s tip: Before marking an invoice paid, check that the
CheckCashtransaction is validated and successful, then verify how much arrived.
Sources
#XRPLEducationMonth