This is my third entry for the XRP Ledger Foundation's #XRPEducationMonth, after How trust lines work on the XRP Ledger, in one TypeScript script and How time-based escrow works on the XRP Ledger, in one TypeScript script.

A Check on the XRP Ledger is a ledger object, not a person in the middle. The sender authorizes a recipient to pull up to a maximum amount later. The funds stay in the sender's account until the recipient cashes the Check. If the sender cannot cover the amount at cash time, the cash fails and the Check remains, so the recipient can try again.

That is the difference from a Payment and from an escrow. A Payment moves units immediately. An escrow locks units when it is created, so they are already set aside for later. A Check does not lock the SendMax. It is a deferred pull, closer to a paper check than to a hold.

I wanted to see those balances in the transaction results, not only in the docs. So I wrote one TypeScript script that runs the whole story on the public Testnet: it creates a Check, cashes it for less than SendMax, then creates a second Check and cancels it.

The script is checks/xrpl-checks.ts.

The plan

The script does this:

  1. Gets two fresh Testnet accounts from the faucet: a sender and a recipient.
  2. The sender creates check A with CheckCreate and a SendMax of 15 XRP, payable to the recipient.
  3. The recipient cashes check A with CheckCash for 10 XRP, which is less than SendMax.
  4. The sender creates check B with a SendMax of 5 XRP.
  5. The sender cancels check B with CheckCancel, before anyone cashes it.

Amounts are in drops in the transactions (1 XRP is 1,000,000 drops). The accounts start with faucet Testnet XRP, which has no real-world value.

Later CheckCash and CheckCancel identify the object with CheckID. That ID is the ledger index of the Check, which the script reads from the CreatedNode in the CheckCreate metadata. It is not the sequence number of the create transaction.

Create check A: funds stay with the sender

After the faucet step, both accounts held 100 XRP. The create transaction looked like this:

{ TransactionType: "CheckCreate", Account: sender.address, Destination: recipient.address, SendMax: xrpToDrops(15), } 

SendMax is the most the sender can be debited if the Check is cashed. The recipient does not have to take that full amount. Expiration is optional. This script leaves it off, so only the sender or the recipient can cancel the Check.

Result from the Testnet run on 6 December 2026:

Sender: rBzzDsUfrSSTsLYBgZRk7jrWnRRnQrSC7m Recipient: rQ8skiDHj1AuyPLPHZ9zcWtdD5J5d6kbi CheckCreate SendMax 15 XRP (check A): tesSUCCESS https://testnet.xrpl.org/transactions/FA25C616503CD3197D86A63AB31DE05863DDBCA4E6BAC6EE94E270138C255F4F Check A ID: ACE778F79F4926DAFD6E1A104E07091518C69FF377528BCDA3E29FF39E4883AA Sender balance after CheckCreate A: 99.999988 XRP Recipient balance after CheckCreate A: 100 XRP 

The sender's balance dropped by only the transaction cost (12 drops). The 15 XRP in SendMax stayed in the sender's account. account_objects then showed the Check sitting on the sender's account, with destination, SendMax of 15 XRP, and that Check ID.

Creating the object still uses an owner reserve until the Check is cashed or canceled. That reserve is a requirement on the account, not a transfer of the SendMax.

Cash check A for less than SendMax

Only the Destination can cash a Check. The cash transaction must include either Amount (an exact amount, no more than SendMax) or DeliverMin (a minimum, and the ledger delivers as much as it can up to SendMax). It cannot include both. This script uses an exact amount:

{ TransactionType: "CheckCash", Account: recipient.address, CheckID: checkIdA, Amount: xrpToDrops(10), } 
CheckCash A for 10 XRP: tesSUCCESS https://testnet.xrpl.org/transactions/198D5C854E2AC9AF47B8C413B8C96C0AE64C456A45A2A796B8C2D5F941E9268E Sender balance after cashing A: 89.999988 XRP Recipient balance after cashing A: 109.999988 XRP Sender checks after cashing A: [] 

The 10 XRP moved at cash time, not at create time. The sender went from 99.999988 XRP to 89.999988 XRP. The recipient received 10 XRP and paid a 12-drop transaction cost, finishing at 109.999988 XRP. The leftover 5 XRP of SendMax was never taken, and the Check object was gone.

If the sender had not been able to cover the 10 XRP, CheckCash would have failed and the Check would have stayed in the ledger. The recipient could then retry later, or for a smaller amount, until the Check expired or was canceled.

Create check B, then cancel it

Check B used a smaller SendMax of 5 XRP. Nobody cashed it. The sender canceled it instead:

{ TransactionType: "CheckCancel", Account: sender.address, CheckID: checkIdB, } 
CheckCreate SendMax 5 XRP (check B): tesSUCCESS https://testnet.xrpl.org/transactions/D892AFD4BED901260B773CF89FF8112C6A4A143FF50C7966406DA616B8E7011A Check B ID: 0570C1B52C84FA3415869B36ED8BB95E52A2D05AB0D03A8B2106CD31BD3B0E58 CheckCancel B: tesSUCCESS https://testnet.xrpl.org/transactions/167403D338C08E36E155387DC0F57FA641A5BFCC8179064FE47603E48DB7B23C Sender balance after canceling B: 89.999964 XRP Recipient balance after canceling B: 109.999988 XRP Sender checks after canceling B: [] 

The 5 XRP never moved. The recipient's balance was unchanged. The sender paid two more transaction costs (create and cancel) and ended at 89.999964 XRP. The Check object was removed, which also releases the owner reserve.

The sender or the recipient can cancel a Check before it expires. After an expiration time, anyone can cancel it, which is how the sender gets the owner reserve back if the recipient never cashes it. An expired Check cannot be cashed, but it stays in the ledger until someone cancels it.

What this shows

A Check is an authorization the ledger enforces, not a lock and not an immediate transfer. Use a Payment when you want units to move now. Use an escrow when you need to lock units so they cannot be spent elsewhere before a time or a condition. Use a Check when the recipient should pull up to a maximum later, and when the sender should keep using those units until that happens.

One practical case is Deposit Authorization. If a destination blocks unsolicited Payments, a Check lets that destination accept the funds by cashing it.

Code: https://github.com/Joe-Simo/xrpl-trust-lines-tutorial (MIT).

Try it yourself

A few changes worth making to the script:

  • Cash check A with DeliverMin instead of Amount, and confirm the ledger delivers as much as it can up to SendMax.
  • Add an Expiration to check B, wait until a validated ledger close is after that time, and confirm that CheckCash fails while CheckCancel from a third Testnet account succeeds.
  • Spend from the sender after creating check A, then try to cash more than the sender can cover, and retry for a smaller amount.

If you want the official version, xrpl.org has the Checks concept page, the send a Check tutorial, and the pages for cashing and canceling a Check.

What clicked for me: the interesting part is not the Check object itself. It is that SendMax is an authorization, not a hold, so the balances only change when the recipient cashes it, or not at all if the Check is canceled.

I wrote this with help from AI tools; I ran every code sample on the XRPL Testnet and checked the facts against xrpl.org.