> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# deposit_authorized

Indicates whether one account is authorized to send payments directly to another, taking Deposit Authorization and any preauthorizations into account.

This method will use `20` [Compute Units](/nodeapi/about/billing).

***

## Reference: [Here](https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized)

## **Parameters**

* `source_account` (string, required) The sender of a possible payment.
* `destination_account` (string, required) The recipient of a possible payment.
* `ledger_hash` (string, optional) The unique hash of the ledger version to use.
* `ledger_index` (number or string, optional) The ledger index of the ledger to use, or a shortcut string such as `validated`, `closed` or `current`.
* `credentials` (array, optional) A set of credential ledger entry IDs to take into account when checking whether the sender can send funds to the destination.

## Returns

* `deposit_authorized` (boolean) Whether the source account is authorized to send payments directly to the destination account. `true` if the destination does not require deposit authorization or has preauthorized the source.
* `source_account` (string) The source account specified in the request.
* `destination_account` (string) The destination account specified in the request.
* `credentials` (array) The credentials specified in the request, if any.
* `ledger_hash` (string) The identifying hash of the ledger used to generate this response.
* `ledger_index` (number) The ledger index of the ledger version used.
* `ledger_current_index` (number) The ledger index of the current in-progress ledger, if used.
* `validated` (boolean) If `true`, the information comes from a validated ledger version.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "result": {
    "deposit_authorized": true,
    "source_account": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
    "destination_account": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
    "ledger_hash": "3FF4EFB0A896061499DCE559C21A44563F74C040226019033B06BA6FC383B450",
    "ledger_index": 107292935,
    "validated": true,
    "status": "success"
  }
}
```

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"method":"deposit_authorized","params":[{"source_account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","destination_account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","ledger_index":"validated"}]}'
  ```
</CodeGroup>

Over WebSocket, send `{"id":1,"command":"deposit_authorized","source_account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","destination_account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","ledger_index":"validated"}` to `wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.