See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function fundPaymentChannel(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'PaymentChannelFund', Account: wallet.address, Channel: 'ABC...', Amount: '500000', }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } fundPaymentChannel().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account funding the channel |
Channel | String | Yes | The unique identifier of the payment channel |
Amount | String | Yes | Amount of XRP to add to the channel (in drops) |
Expiration | Number | No | New expiration time for the channel |
Channel:
Unique identifier returned from PaymentChannelCreate
Must reference an existing payment channel
Amount:
Must be specified in drops (1 XRP = 1,000,000 drops)
Example: "500000" = 0.5 XRP
Adds to the total capacity of the channel
Expiration:
Unix timestamp in seconds
If specified, extends the channel's expiration time
If omitted, keeps the original expiration time
Note:
Can only be executed by the channel creator
Increases the total capacity available for micropayments
The channel must be active (not expired or closed)
Adds more XRP to an existing payment channel
Can only be executed by the channel creator
Amount specifies the additional XRP to add
Increases the total capacity available for micropayments
Always use autofill to set fees and sequence safely when using the XRPL client library