deposit_authorized
Last updated
Last updated
The deposit_authorized
command indicates whether one account is authorized to send payments directly to another. See Deposit Authorization for information on how to require authorization to deliver money to your account.
An example of the request format:
The request includes the following parameters:
Field
Type
Description
source_account
String - [Address][]
The sender of a possible payment.
destination_account
String - [Address][]
The recipient of a possible payment.
ledger_hash
String
(Optional) A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][])
ledger_index
String or Unsigned Integer
(Optional) The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][])
An example of a successful response:
The response follows the [standard format][], with a successful result containing the following fields:
Field
Type
Description
deposit_authorized
Boolean
Whether the specified source account is authorized to send payments directly to the destination account. If true
, either the destination account does not require Deposit Authorization or the source account is preauthorized.
destination_account
String - [Address][]
The destination account specified in the request.
ledger_hash
String
(May be omitted) The identifying hash of the ledger that was used to generate this response.
ledger_index
Number - [Ledger Index][]
(May be omitted) The ledger index of the ledger version that was used to generate this response.
ledger_current_index
Number - [Ledger Index][]
(May be omitted) The ledger index of the current in-progress ledger version, which was used to generate this response.
source_account
String - [Address][]
The source account specified in the request.
validated
Boolean
(May be omitted) If true
, the information comes from a validated ledger version.
Note: A deposit_authorized
status of true
does not guarantee that a payment can be sent from the specified source to the specified destination. For example, the destination account may not have a trust line for the specified currency, or there may not be enough liquidity to deliver a payment.
Any of the [universal error types][].
invalidParams
- One or more fields are specified incorrectly, or one or more required fields are missing.
actMalformed
- An [Address][] specified in the source_account
or destination_account
field of the request was not properly formatted. (It may contain a typo or be the wrong length, causing a failed checksum.)
dstActNotFound
- The destination_account
field of the request does not correspond to an account in the ledger.
lgrNotFound
- The ledger specified by the ledger_hash
or ledger_index
does not exist, or it does exist but the server does not have it.
srcActNotFound
- The source_account
field of the request does not correspond to an account in the ledger.