---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/AccountManagement_Deposit.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/AccountManagement_Deposit.md
  - href: en/live/AccountManagement_Deposit.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# Deposit
Adds funds to shared accounts using an advertising agency's credit limit, or the advertiser's overdraft.
This action allows advertising agencies and direct advertisers to add funds to the account balance with deferred payment (see the section [Paying by credit and overdraft](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/finance.md)).

## Recommendations and restrictions

A direct advertiser can add funds to the shared account only if there is at least one campaign that has passed moderation.

We recommend adding funds to shared accounts using the fewest possible `AccountManagement.Deposit` operations per day. This recommendation is aimed at improving the performance of the Yandex Direct API. From the point of view of productivity, it is better to make deposits to several accounts in a single operation than to use multiple operations to make each deposit separately.

## Input data

The input data structure in JSON is shown below.


{% note alert %}

It is mandatory to include the `finance_token` and `operation_num` parameters in the request. For information on generating the token, see the section [Working with the shared account](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/shared-account-howto.md).

{% endnote %}


```javascript
{
   "method": "AccountManagement",
   "finance_token": (string),
   "operation_num": (int),
   "param": {
      /* AccountManagementRequest */
      "Action": (string),
      "Payments": [
         {  /* Payment */
            "AccountID": (int),
            "Amount": (float),
            "Origin": (string),
            "Contract": (string),
            "Currency": (string)
         }
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >AccountManagementRequest object</sub>**
||
||
`Action`
|
Action: Deposit.
|
Yes
||
||
`Payments`
|
Array of `Payment` objects (no more than 50). Each object contains the ID of the shared account and the payment amount.
|
Yes
||

||
**<sub >Payment object</sub>**
||
||
`AccountID`
|
ID of the shared account to add funds to.
|
Yes
||
||
`Amount`
|
The deposit amount in the currency specified in the `Currency` parameter. The value in a real currency should include the client's VAT.

The specified amount is mathematically rounded to the second decimal place (for all currencies, including the tenge).

To get the minimum acceptable value, use the [Dictionaries](https://yandex.com/dev/direct/doc/ref-v5dictionaries/dictionaries.md).[get](https://yandex.com/dev/direct/doc/ref-v5dictionaries/get.md) method for version 5 of the API and specify the dictionary name `Currencies` in the request.
|
Yes
||
||
`Origin`
|
Deposit method: Overdraft.
|
For payment using overdraft
||
||
`Contract`
|
The number of the credit agreement.
|
For payment using credit
||
||
`Currency`
|
The currency that the amount is shown in.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the currency of the shared account; otherwise, an error is returned with code [245](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#BadCurrency).
|
Yes
||
|#

## Output data


{% note alert %}

An error when depositing funds to one of the accounts does not cause the entire operation to be canceled, and does not affect the success of depositing funds to the other accounts.

{% endnote %}


The output data structure in JSON is shown below.

```javascript
{
   "data": {
      /* AccountManagementResponse */
      "ActionsResult": [
         {  /* AccountActionResult */
            "AccountID": (int),
            "Errors": [
               {  /* Error */
                  "FaultCode": (int),
                  "FaultString": (string),
                  "FaultDetail": (string)
               }
               ...
            ]
         }
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
||

||
**<sub >AccountManagementResponse object</sub>**
||
||
`ActionsResult`
|
Array of `AccountActionResult` objects. Each object corresponds to an item in the `Payments` input array and contains:

- The ID of the shared account, if the deposit to the shared account was successful.
- The `Errors` array, if an error occurred.

The items in the array are in the same order as the objects in the `Payments` input array.
||

||
**<sub >AccountActionResult object</sub>**
||
||
`AccountID`
|
ID of the shared account.
||
||
`Errors`
|
Array of `Error` objects with errors that occurred while adding funds to the account.
||

||
**<sub >Error object</sub>**
||
||
`FaultCode`
|
Error code.
||
||
`FaultString`
|
Textual message about the error.
||
||
`FaultDetail`
|
Detailed description of the reason for the error.
||
|#

## Examples of input data

# Python

```python
{
   'Action': 'Deposit',
   'Payments': [
      {
         'AccountID': 3193244,
         'Amount': 5000.0,
         'Origin': 'Overdraft',
         'Currency': 'RUB'
      },
      {
         'AccountID': 3193279,
         'Amount': 1200.0,
         'Contract': '23452345/67',
         'Currency': 'USD'
      }
   ]
}
```

# PHP

```php
array(
   'Action' => 'Deposit',
   'Payments' => array(
      array(
         'AccountID' => 3193244,
         'Amount' => 5000.0,
         'Origin' => 'Overdraft',
         'Currency' ='RUB'
      ),
      array(
         'AccountID' => 3193279,
         'Amount' => 1200.0,
         'Contract' => '23452345/67',
         'Currency' ='USD'
      )
   )
)
```

# Perl

```perl
{
   'Action' => 'Deposit',
   'Payments' => [
      {
         'AccountID' => 3193244,
         'Amount' => 5000.0,
         'Contract' => 'Overdraft',
         'Currency' ='RUB'
      },
      {
         'AccountID' => 3193279,
         'Amount' => 1200.0,
         'Contract' => '23452345/67',
         'Currency' ='RUB'
      }
   ]
}
```

