
One package, four modes
4 minDifficulty Checked 2026-11-10- A Batch holds two to eight inner transactions from one or more accounts.
- The mode decides which inner transactions apply: all, the first success, until failure, or each alone.
- The outer Batch can succeed while inner transactions fail. Check each inner result.
Picture a shopping cart. You put several items in and pay once at the register. A Batch does the same for transactions. You pack two to eight of them into one package, sign it, and submit it.
The package needs a rule for what happens when one item fails. The XRP Ledger offers four rules, called modes:
- All or nothing. Every transaction must work, or none of them count. This suits a swap where both sides must happen.
- Only one. The ledger tries them in order and keeps the first that works. This suits trying several prices.
- Until failure. The ledger applies them in order and stops at the first failure.
- Independent. The ledger tries every one. A failure does not stop the others.
Each transaction inside the package is an inner transaction. The package itself is the outer transaction.
One trap catches people. The outer package can report success even when inner transactions failed. The outer result only says the package was accepted and paid for. Each inner transaction has its own result, and that result tells you what happened.
Inner transactions can come from different accounts. Two people can trade tokens in one all-or-nothing Batch. Neither side can take the other's half and walk away.
Batch is defined in XLS-56. The live amendment is BatchV1_1, enabled on mainnet on 2026-10-09.
Fields on the outer transaction:
| Field | Meaning |
|---|---|
Flags | Exactly one batch mode |
RawTransactions | 2 to 8 inner transactions, each wrapped in a RawTransaction object |
BatchSigners | Signatures from other accounts, for multi-account batches |
Mode flags:
| Flag | Hex | Rule |
|---|---|---|
tfAllOrNothing | 0x00010000 | All must succeed or none apply |
tfOnlyOne | 0x00020000 | The first success is the only one applied |
tfUntilFailure | 0x00040000 | Apply in order until the first failure |
tfIndependent | 0x00080000 | Apply all, regardless of failures |
Any result other than tesSUCCESS counts as a failure for these rules.
Inner transactions are committed as separate transactions with their own metadata. Each carries a ParentBatchID that points back to the outer transaction. Inner transactions with a tes or tec result can be read with tx and account_tx. If validated, they are in the same ledger as the outer transaction.
The outer metadata covers only its sequence and fee. It returns tesSUCCESS even when inner processing fails. Look up each inner hash to confirm its result.
Limits:
- A
Batchcannot contain anotherBatch. - Inner transactions are not relayed and cannot be submitted alone.
- xrpl.org lists types disabled as inner transactions, such as the vault and loan types.
- The
simulatemethod does not supportBatch.
Related: Signing and fees.
- Batch TransactionsRead 2026-11-10
- BatchRead 2026-11-10
- XLS-56: Atomic/Batch TransactionsRead 2026-11-10
- Vulnerability Disclosure Report for xrpld 3.4.1Read 2026-11-10
