DepositPreauth Transaction

A DepositPreauth transaction grants preauthorization to deliver payments to your account. This is only useful if you are using (or plan to use) Deposit Authorization.

Tip

You can use this transaction before you enable Deposit Authorization. This may be useful to ensure a smooth transition from not requiring deposit authorization to requiring it.

Example DepositPreauth JSON

{
  "TransactionType" : "DepositPreauth",
  "Account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
  "Authorize" : "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
  "Fee" : "10",
  "Flags" : 2147483648,
  "Sequence" : 2
}

Query example transaction. >

DepositPreauth Fields

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

FieldJSON TypeInternal TypeRequired?Description
AuthorizeString - AddressAccountIDNoAn account to preauthorize.
AuthorizeCredentialsArraySTArrayNoA set of credentials to authorize.
UnauthorizeStringAccountIDNoAn account whose preauthorization should be revoked.
UnauthorizeCredentialsArraySTArrayNoA set of credentials whose preauthorization should be revoked.

You must provide exactly one of Authorize, AuthorizeCredentials, Unauthorize, or UnauthorizeCredentials.

If this transaction is successful, it creates or removes a DepositPreauth entry in the ledger, based on the field provided.

AuthorizeCredentials Objects

If provided, each member of the AuthorizeCredentials field or UnauthorizeCredentials field must be an inner object with the following fields:

FieldJSON TypeInternal TypeRequired?Description
IssuerString - AddressAccountIDYesThe issuer of the credential.
CredentialTypeString - HexadecimalBlobYesThe credential type of the credential.

Error Cases

In addition to error types that can occur for all transactions, DepositPreauth transactions can result in the following error codes:

Error CodeDescription
tecDUPLICATEThe transaction would create a preauthorization that already exists.
tecINSUFFICIENT_RESERVEThe sender would not meet the reserve requirement after adding another entry to the ledger. (A DepositPreauth entry counts as one item towards the authorizer's owner reserve.)
tecNO_ENTRYThe transaction tried to revoke a preauthorization that does not exist in the ledger.
tecNO_ISSUEROne or more specified credential issuers does not exist in the ledger.
tecNO_TARGETThe transaction tried to authorize an account that is not a funded account in the ledger.
temCANNOT_PREAUTH_SELFThe address in the Authorize field is the sender of the transaction. You cannot preauthorize yourself.
temDISABLEDA required amendment is not enabled.