See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function createPaymentChannel(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'PaymentChannelCreate', Account: wallet.address, Destination: 'r...dest', Amount: '1000000', SettleDelay: 86400, PublicKey: 'ED...', }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } createPaymentChannel().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account creating the payment channel |
Destination | String | Yes | The address that can claim payments from this channel |
Amount | String | Yes | Amount of XRP to lock in the channel (in drops) |
SettleDelay | Number | Yes | Time in seconds the channel must stay open after close request |
PublicKey | String | Yes | Public key of the key pair that can sign claims |
CancelAfter | Number | No | Time after which the channel expires and can be closed |
DestinationTag | Number | No | Arbitrary tag to identify the reason for the payment channel |
Amount:
Must be specified in drops (1 XRP = 1,000,000 drops)
Example: "1000000" = 1 XRP
SettleDelay:
Minimum: 1 second
Maximum: 1 week (604,800 seconds)
Recommended: 24 hours (86,400 seconds) or more
Creates a payment channel for efficient micropayments
Amount specifies the total XRP reserved for the channel
Destination is the recipient account
SettleDelay determines how long the channel remains open after closure
Always use autofill to set fees and sequence safely when using the XRPL client library