Reports on accepted and returned transfers

Once a day, Yandex.Money generates reports on deposited and returned transfers. Reports are generated as files in CSV (Comma Separated Values) format and sent as attachments to the Counterparty's email address. The emails are signed with the Yandex.Money certificate (S/MIME signature).

The report on deposited transfers contains all transfers made on the specified date.

The report on returned transfers contains all the transfers returned (partially or completely) on the specified date.

The format of the report file conforms to the recommendations of IETF RFC4180. The semicolon (;) is used as the field divider. Encoding is UTF-8.

The CSV text format is a set of rows separated by the line feed character (LF or CRLF). Each row contains fields separated by semicolons (;). If any parameter values contain double quote characters ("), semicolons (;), or line feeds, these parameters must be enclosed in quotation marks (").

Note. 

It is allowed to put all fields in quotation marks, regardless of which characters they contain. If a field is not enclosed in quotation marks, all the surrounding spaces (up to the semicolon or up to the start or end of the line) are ignored.

The email subject is generated from a template:

REGISTER FOR <Counterparty's name> DATE <Transfers date (yyyy-mm-dd)>. No. <number>

Format of the file name of the report on accepted transfers:

settlement_file_<agentId>_<yyyy-mm-dd>_<number>.csv

Format of the file name of the report on returned transfers:

refund_file_<agentId>_<yyyy-mm-dd>_<number>.csv

Structure of the report file

The report file contents consist of the following elements:

  • The report header containing data about the report number and date (HD row).
  • Transfers on the specified date (D rows).
  • The control row or marker of no more transfers at the end of the report (TD row).

Report header (HD row)

The report header contains the merchant ID in Yandex.Money, the report number (report ID) and the report period that the report was generated for.

Format of the report header:

HD;agentId;registerId;from;till

Report header parameters

Parameter

Type

Description

registerId xs:long

ID of the generated report, unique over the entire history of operations.

agentId xs:long

Counterparty ID.

from xs:dateTime

Beginning of the report period that the report was generated for, inclusively (including "from").

till xs:dateTime

End of the report period that the report was generated for, exclusively (not including "till").

Example report header:

HD;123456;2277;2015-07-01T00:00:00.000+03:00;2015-07-02T00:00:00.000+03:00

Transfer (D row)

A separate D row is formed for each transfer made during the report period.

Note. 

The time when a transfer was completed is considered the time returned in the processedDT field in the response to the makeDeposition request.

Line feed format:

D;clientOrderId;amount;currency;dstAccount;processedDT

Line feed parameters:

Parameter

Type

Description

dstAccount YMAccount

ID of the transfer recipient.

clientOrderId ClientTransactionNumber

Operation ID.

processedDT xs:dateTime

The time when funds were deposited to the recipient's account, received in the response to the deposit request (makeDeposition). In the case of returned funds, the time when the money was returned from the recipient's accounts.

amount CurrencyAmount

The amount of the transfer or refund.

currency CurrencyCode

Currency code of the transfer.

Example row:

D;123;1000.00;643;410010000400;2015-07-01T10:52:01.000+03:00

Control row (TD row)

The control row is the sum of all the transfers in the current report. If there weren't any transfers in the specified period, the report is considered empty and the control row is omitted.

Note. 

An empty report only contains the header row and the zero row (Z row).

String format:

TD;count;sum;currency

Control row parameters:

Parameter

Type

Description

count xs:int

Number of transfers during the specified period.

sum CurrencyAmount

Total amount of the transfers during the specified period.

currency CurrencyCode

Currency code of the total amount.

Example row:

TD;10;10547.25;643

Report example

HD;123456;2277;2015-07-01T00:00:00.000+03:00;2015-07-02T00:00:00.000+03:00
D;123;1000.00;643;41001000040;2015-07-01T10:52:01.000+03:00
D;124;25000.00;643;41001000040;2015-07-01T10:52:02.000+03:00
TD;2;26000.00;643

Example empty report

HD;123456;2277;2015-07-01T00:00:00.000+03:00;2015-07-02T00:00:00.000+03:00
Z

See also

Funds deposit

Data types