See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function claimPaymentChannel(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'PaymentChannelClaim', Account: wallet.address, Channel: 'ABC...', Amount: '1000', }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } claimPaymentChannel().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account claiming from the channel |
Channel | String | Yes | The unique identifier of the payment channel |
Amount | String | No | Amount of XRP to claim from the channel |
Balance | String | No | New balance to set for the channel |
Signature | String | No | Signature authorizing the claim |
PublicKey | String | No | Public key for signature verification |
Flags | Number | No | Flags to control claim behavior |
Usage:
To claim XRP: Provide Amount field
To close channel: Provide Balance field
For signed claims: Provide Signature and PublicKey
Amount vs Balance:
Amount: Claims a specific amount of XRP
Balance: Sets the channel balance (used for closing)
Flags:
0x00010000 (tfClose): Close the channel after this claim
0x00020000 (tfRenew): Extend the channel's expiration
Note:
Can be executed by the channel destination
Requires a valid signature from the channel destination
Can close the channel and return remaining funds to the creator
Claims XRP from a payment channel using a signed claim
Can close the channel and return remaining funds to the creator
Requires a valid signature from the channel destination
Amount specifies how much XRP to claim
Always use autofill to set fees and sequence safely when using the XRPL client library