Funds deposit (makeDeposition)
This is an old version of the API. Switch to the YooMoney API.
Для перевода денег получателям выплат нужно использовать запрос
makeDeposition
. Вы можете делать выплаты физическим лицам и самозанятым. Деньги можно переводить на кошельки ЮMoney, рублевые банковские счета, банковские карты и счета мобильных телефонов.If you make payouts from a business account, use the instructions in the article on payouts from a business account.
Specifics
Данные для зачисления переводов получателям выплат необходимо передавать в запросе makeDeposition. Что важно учесть:
Выплаты по виду или получателю | Особенности |
---|---|
Выплаты на кошельки | — |
Выплаты на банковские карты или банковские счета |
|
Выплаты на номера мобильных телефонов |
|
Выплаты самозанятым |
|
Согласие с офертой ЮKassa
Только для выплат на банковские счета, карты и номера мобильных телефонов
Если вы делаете выплаты на банковские карты, банковские счета и номера мобильных телефонов, вам необходимо получить от пользователя согласие с офертой ЮKassa. Для этого разместите на своей стороне ссылку на оферту и реализуйте получение от пользователя подтверждения, что он согласен с условиями.
Ссылка на оферту ЮKassa
https://yoomoney.ru/pay/page?id=526623
После получения согласия передавайте в запросе makeDeposition параметр
pof_offerAccepted
.Verification of recipient’s passport information
Только для выплат на банковские счета и карты
In requests to debit to a bank account or bank card, the recipient’s personal data must be passed. Before making the deposit, YooMoney verifies this data against the database of active passports of the Ministry of Internal Affairs (as required by the legislation of the Russian Federation).
If everything is in order, the YooMoney service will returns
status=0
.If the data does not pass verification, the YooMoney service returns
status=3
, a deposition error (error=48
) with an explanation.Формат запроса
Address for sending requests
https://payouts.yookassa.ru:9094/webservice/deposition/api/makeDeposition
Общие параметры запроса
Здесь описаны только общие параметры, которые есть в каждом запросе на зачисление перевода. Параметры, специфичные для конкретного вида или получателя выплаты, описаны в соответствующих статьях:
- Выплаты на кошельки ЮMoney
- Выплаты на банковскую карту
- Выплаты на банковский счет
- Выплаты на баланс мобильного телефона
- Выплаты самозанятым (для всех способов получения выплат)
Описание общих параметров
Parameter | Type | Description |
---|---|---|
dstAccount | YMAccount | Identifier of the transfer recipient. Depends on where you send the transfer: Required parameter |
clientOrderId | ClientTransactionNumber | Operation ID. Must be unique for your system over the entire history of operations. Recommended values: a positive integer in decimal notation. Required parameter |
requestDT | xs:dateTime | The date and time the operation request was formed on your side, according to your system. Required parameter |
amount | CurrencyAmount | The transfer amount. For example: 12.34 Required parameter |
currency | CurrencyCode | Currency code of the transfer. Possible value — 643 (Russian ruble).Required parameter |
agentId | xs:long | Идентификатор вашего шлюза. Выдается ЮKassa. Required parameter |
contract | xs: normalizedString, up to 128 characters | The reason for making the transfer. При выплатах самозанятым — описание услуги, оказанной получателем выплаты (для печати в чеке). Required parameter |
paymentParams | xs: complexType | Дополнительные данные для выплат. Possible values are described in the sections Payouts to bank card, Payouts to bank account, and Payouts to mobile phone account. Optional parameter |
Request example
Request to transfer specifying paymentParams (makeDeposition)
XML
<makeDepositionRequest agentId="200225" clientOrderId="272517" requestDT="2013-04-12T00:01:54.000Z" dstAccount="2570066957329" amount="249.00" currency="643" contract=""> <paymentParams> <pof_offerAccepted>1</pof_offerAccepted> <PROPERTY1>905</PROPERTY1> <PROPERTY2>2075556</PROPERTY2> <smsPhoneNumber>79653457676</smsPhoneNumber> </paymentParams> </makeDepositionRequest>
Формат ответа
Здесь описаны только общие параметры, которые есть в каждом ответе на зачисление перевода. При выплатах самозанятым в ответе дополнительно возвращаются параметры, связанные с регистрацией чека.
Параметры ответа
Parameter | Type | Description |
---|---|---|
status | xs:int | Result of executing the operation. По значению этого поля вам необходимо принимать решение о состоянии запроса. See Request status codes |
error | xs:int | Code of the request execution error. Additional explanation of the status . |
clientOrderId | ClientTransactionNumber | The value of the clientOrderId request parameter. The parameter is omitted in the response if the request was not parsed (error codes 10 , 50 , 51 , 53 , 55 ) or if the clientOrderId request parameter is missing or invalid (error=18 ). |
processedDT | xs:dateTime | Time when the request was processed, according to the YooMoney server. For a successful transfer, this is the actual time when money was transferred. |
balance | xs:decimal | The difference between the security amount that you have transferred to the gateway account in YooMoney, and the amount of money that YooMoney has transferred to users at your request. This parameter is passed in the response only if the transfer was successful. |
techMessage | xs:string | May contain an additional explanation for refusals make the payout. This text contains technical information and should not be displayed in any user interface. Optional parameter |
identification | xs:string | This field contains information about the status of the Wallet in the YooMoney for Shopping service. Only present for deposits to YooMoney for Shopping wallets. Possible values:
|
invoiceId | xs:string | Internal ID of the payout in YooMoney. It’s a technical parameter, ignore it when processing the response. The value of this parameter must not be displayed in any user interface. Optional parameter |
Example of a response
Response about successful deposit (makeDeposition)
XML
<makeDepositionResponse clientOrderId="12345" status="0" processedDT="2011-07-01T20:38:01.000Z" balance="1000.00"/>
Rules for forming and processing requests
- Each transfer must be formed with a unique ID value (
clientOrderId
). - If the response Success (
status=0
) is received for the deposit operation, it means the transfer was completed successfully. In some cases of a successful transfer, YooMoney might return theerror
field in the response with an additional explanation of the operation status. - If the request was sent with a previously processed ID (
clientOrderId
) and the values of thedstAccount
andamount
parameters match the previous attempt, YooMoney returns the result of processing the previously sent request. - If the request was sent with a previously processed ID (
clientOrderId
) and the values of thedstAccount
andamount
parameters differ from the first attempt, YooMoney declines this request and returnsstatus=3
,error=26
in the response. - The YooMoney processes a received request immediately. If a request can’t be handled within a few seconds, the response processing (
status=1
) is returned. In this case, the result of the operation is unknown, and the merchant should repeat the request with the same data to get a final response. We recommend retrying as follows: the first retry after 1 minute, the next three with an interval of 5 minutes, and then not more than once every 30 minutes. We recommend the same retry attempts if the response from the YooMoney is not received, or if the response contains HTTP status 500. - If there is no response from YooMoney, or if the response is indefinite (for example: HTTP status 500), you should repeat the request with the same data until the final response is received. We recommend using the same retry attempts as in the previous point.
- The status of a transaction in progress (
status=1
) may change either to Success (status=0
) or Declined (status=3
). - If the transfer was declined by the YooMoney, the response returns
status=3
anderror
with the code of the reason for refusal. In some cases thetechMessage
field may be included, which contains additional information in the form of text in any format. This text is intended for analysis by technical specialists and shouldn’t be shown in any user interface. - If the transfer is refused with the error
status=3 error=45
, you should deposit accepted transfers to the YooMoney account and confirm that the balance increased (by sending a balance request), then make the transfers with new transaction IDs (clientOrderId
). - The response
status=3 error=21
means that the requested operation is not allowed for you.
See also