Skip to main content

deposit_authorized

POST

Checks whether one account is authorized to send payments directly to another.It determines the authorization status when the destination account has Deposit Authorization enabled.
param[0]
parametersobjectrequired
source_accountstringrequired
The account that would send the payment.
destination_accountstringrequired
The account that would receive the payment.
credentialsarray
The credential ledger entry IDs to use for authorization.When a value is provided, an empty array is not allowed.
ledger_hashstring
The hash of the ledger version to use. Pass a 32-byte hex string.
ledger_indexoneOf
Specifies the ledger version to use. Pass a ledger index as an integer, or use one of the shortcut strings below.
  • validated: Uses the most recent ledger version validated by the network.
  • closed: Uses the most recent ledger version the server has closed. It may not be validated.
  • current: Uses the in-progress ledger version the server is currently building.
The ledger index of the version to use.
Responses
deposit_authorizedboolean
Whether the source account is authorized to send payments directly to the destination account.
source_accountstring
The source account address from the request.
destination_accountstring
The destination account address from the request.
credentialsarray
The credentials from the request. Returned only when they were provided.
ledger_hashstring
The hash of the ledger version used. Returned when a validated ledger version was queried.
ledger_indexinteger
The ledger index of the version used. Returned when a validated ledger version was queried.
ledger_current_indexinteger
The ledger index of the in-progress ledger. Returned when the current ledger was queried.
validatedboolean
Whether the response was derived from a validated ledger version.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://xrpl-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"method": "deposit_authorized",
"params": [
{
"source_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"destination_account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
}
]
}'