John calls the "EscrowCreate" function specifying the release time, amount, Phoebe's Ripple address and expiration time. The amount specified would be debited from John's account and will now be locked up in the newly created escrow.
Before the escrow finish/release time, no one will be able to access the locked XRP. After the release time, either John, Phoebe or any user can call the "EscrowFinish" function to release the locked up XRP into Phoebe's account.
If Phoebe doesn't redeem her money before the escrow expires, John can call the "EscrowCancel" function to return the locked up funds to his account.
The following demonstrates the working of an escrow:
- John creates the escrow on Ripple using the "EscrowCreate" function. The amount would be 4,000 XRP and the lock period would be 3 months:

- Phoebe calls the "EscrowFinish" function after three months:

- The Ripple network releases 4,000 XRP to Phoebe's account:

Here's an example of the "EscrowCreate" JSON that would be used by the creator of the XRP to lock 200 XRP:
{
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"TransactionType": "EscrowCreate",
"Amount": "100000000",
"Destination": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"CancelAfter": 533257958,
"FinishAfter": 533171558,
"Condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
"DestinationTag": 23480,
"SourceTag": 11747
}
Here's an example of the "EscrowFinish" JSON that can be used by anyone to send the locked funds to the destination account after the escrow finish time has lapsed:
{
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"TransactionType": "EscrowFinish",
"Owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
}