See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function createCheck(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'CheckCreate', Account: wallet.address, Destination: 'r...dest', SendMax: '1000000', }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } createCheck().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account creating the check |
Destination | String | Yes | The address that can cash the check |
SendMax | String/Object | Yes | Maximum amount the check can be cashed for |
Expiration | Number | No | Time after which the check expires |
DestinationTag | Number | No | Arbitrary tag to identify the reason for the check |
InvoiceID | String | No | Arbitrary 256-bit hash to identify the check |
SendMax:
For XRP: "1000000" (drops)
For issued currency: {"currency": "USD", "issuer": "r...", "value": "1"}
Expiration:
Unix timestamp in seconds
If omitted, check never expires
Expired checks cannot be cashed
Note:
Creates a deferred payment that can be cashed by the destination
The actual amount cashed may be less than SendMax
Creates a check for the destination account to cash
Amount specifies the XRP or issued currency to be transferred
Destination is the account that can cash the check
Expiration sets a time limit for cashing the check
Always use autofill to set fees and sequence safely when using the XRPL client library