CheckCash
[Source]
(Added by the [Checks amendment][].)
Example
Section titled “Example”{ "Account": "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy", "TransactionType": "CheckCash", "Amount": "100000000", "CheckID": "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334", "Fee": "12"}| Field | JSON Type | Internal Type | Description |
|---|---|---|---|
CheckID | String | Hash256 | The ID of the Check ledger object to cash, as a 64-character hexadecimal string. |
Amount | Currency Amount | Amount | (Optional) Redeem the Check for exactly this amount, if possible. The currency must match that of the SendMax of the corresponding CheckCreate transaction. You must provide either this field or DeliverMin. |
DeliverMin | Currency Amount | Amount | (Optional) Redeem the Check for at least this amount and for as much as possible. The currency must match that of the SendMax of the corresponding CheckCreate transaction. You must provide either this field or Amount. |
The transaction must include either Amount or DeliverMin, but not both.
Error Cases
Section titled “Error Cases”- If the sender of the CheckCash transaction is not the
Destinationof the check, the transaction fails with the result codetecNO_PERMISSION. - If the Check identified by the
CheckIDfield does not exist, the transaction fails with the resulttecNO_ENTRY. - If the Check identified by the
CheckIDfield has already expired, the transaction fails with the resulttecEXPIRED. - If the destination of the Check has the
RequireDestflag enabled but the Check, as created, does not have a destination tag, the transaction fails with the result codetecDST_TAG_NEEDED. - If the transaction specifies both
AmountandDeliverMin, or omits both, the transaction fails with the resulttemMALFORMED. - If the
AmountorDeliverMindoes not match the currency (and issuer, if not XAH) of the Check, the transaction fails with the resulttemBAD_CURRENCY.