Send Fungible Token Escrows
This tutorial shows how to create and finish escrows that hold fungible tokens on the XRP Ledger. It covers a conditional escrow of Multi-Purpose Tokens (MPTs) and a timed escrow of trust line tokens.
- Section
- Tutorials
What it covers
The conditional MPT escrow is released when a crypto-condition is fulfilled. The timed trust line token escrow is released after a specified time. Both token types can be used in either kind of escrow. Token escrows were added by the TokenEscrow amendment, enabled 2026-02-12.
What you need
You need a basic understanding of the XRP Ledger and a client library installed. The page gives examples in JavaScript with xrpl.js, Python with xrpl-py and Go with xrpl-go.
The MPT escrow in short
Fund two accounts, an issuer and an escrow creator. The issuer sends an MPTokenIssuanceCreate transaction with the tfMPTCanEscrow flag, which lets the token be held in escrows. The escrow creator opts in with an MPTokenAuthorize transaction and receives MPTs through a Payment transaction. Create a fulfillment and its condition with a crypto-conditions library, in the PREIMAGE-SHA-256 format. Create the escrow with the condition and save its sequence number. Finish it by providing the condition and its matching fulfillment.
The trust line escrow in short
The issuer enables the asfAllowTrustLineLocking flag on its account. The escrow creator sets up a trust line with a TrustSet transaction and receives tokens through a Payment transaction. Create the escrow with an EscrowCreate transaction that sets a maturity time, in seconds since the Ripple Epoch. Wait until a validated ledger has closed after that time, then send an EscrowFinish transaction.
Good to know
Fungible token escrows require an expiration time. MPTs are escrowable at the token level. Trust line tokens are escrowable at the account level, so the flag makes all trust line tokens issued from that account escrowable. To create an MPT escrow for another account, the issuer also has to set the tfMPTCanTransfer flag.
Source: xrpl.org. Read 6 December 2026.
Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made