Cash a Check for a Flexible Amount
This tutorial shows how to cash a Check for a flexible amount, which means receiving as much as possible. You set a minimum amount to receive, in case the sender does not have enough money to pay the full amount.
- Section
- Tutorials
What you will do
As long as the Check is not expired, the specified recipient can cash it to receive the maximum amount available. If the Check cannot deliver at least the minimum, cashing fails. The Check stays in the ledger and you can try again later.
What you need
You should know the basics of the xrpl.js client library. You need the ID of a Check ledger entry that you are the recipient of. You can get it from whoever sent you the Check, or by looking up Checks where your account is the destination.
The steps in short
Prepare a CheckCash transaction with four fields: TransactionType, Account, CheckID and DeliverMin. Account is your address. DeliverMin is the minimum amount to receive. For XRP it is a string of drops, and one drop is the smallest unit of XRP. For tokens it is an object with currency, issuer and value fields. The currency and issuer must match the Check, and the value must be less than or equal to the amount in the Check. Submit the transaction and wait for it to be validated.
Checking what arrived
A successful transaction has tesSUCCESS as its TransactionResult in the metadata, the record of what the transaction did. It then delivered at least the DeliverMin amount and at most the SendMax of the Check. To see the exact balance changes, look at the metadata. The getBalanceChanges function in xrpl.js can summarize it.
Good to know
The metadata shows net balance changes. Your XRP credit appears minus the transaction cost of sending the CheckCash transaction. For tokens with a third-party issuer, two trust lines change: sender to issuer, and issuer to recipient. If the token has a transfer fee, the sender may be debited more than the recipient is credited.
Source: xrpl.org. Read 6 December 2026.
Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made