Last updated
Edit

Clawback

[Source]

Claw back tokens issued by your account. Issuers can only claw back trust line tokens if they enabled the Allow Trust Line Clawback setting before issuing any tokens. Issuers can claw back MPTs if the corresponding MPT Issuance has clawback enabled.

Requires the Clawback amendment. Loading...

Example Clawback JSON

{
  "TransactionType": "Clawback",
  "Account": "rp6abvbTbjoce8ZDJkT6snvxTZSYMBCC9S",
  "Amount": {
      "currency": "FOO",
      "issuer": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
      "value": "314.159"
    }
}

Clawback Fields

In addition to the common fields, Clawback transactions use the following fields:

FieldJSON TypeInternal TypeRequired?Description
AmountCurrency AmountAmountYesThe amount to claw back. The quantity in the value sub-field must not be zero. If this is more than the current balance, the transaction claws back the entire balance. When clawing back trust line tokens, the issuer sub-field indicates the token holder to claw back tokens from.
HolderStringAccountIDNoThe holder to claw back tokens from, if clawing back MPTs. The holder must have a non-zero balance of the MPT issuance indicated in the Amount field.

Requires the MPTokensV1 amendment. Loading...

When clawing back trust line tokens, you must omit the Holder field. When clawing back MPTs, you must provide the Holder field.

Error Cases

Besides errors that can occur for all transactions, Clawback transactions can result in the following transaction result codes:

Error CodeDescription
temDISABLEDThe Clawback amendment is not enabled.
temBAD_AMOUNTThe amount of tokens specified to claw back is invalid or zero, or the specified holder is the issuer.
tecAMM_ACCOUNTThe specified holder is an Automated Market Maker (AMM). To claw back tokens from an AMM, use AMMClawback instead.
tecNO_LINEThere is no trust line with the counterparty or that trust line's balance is 0.
tecNO_PERMISSIONThe sender of this transaction does not have the ability to claw back the specified tokens.