Operation-details method
Provides detailed information about a particular operation from the history.
Required permissions:
operation-details
.Request
Parameters
Parameter | Type | Description |
---|---|---|
operation_id | string | Operation ID. The value of the parameter should be set like the value of the operation_id parameter from the operation-history method response; if the buyer’s account history is being requested, it should be like the payment_id value from the process-payment method response. |
Request example
POST /api/operation-details HTTP/1.1 Host: yoomoney.ru Authorization: Bearer 410012345678901.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123 Content-Type: application/x-www-form-urlencoded Content-Length: 20 operation_id=1234567
Response
The method returns the following parameters:
Parameter | Type | Description |
---|---|---|
error | string | Error code, present only if an error occurred. |
operation_id | string | Operation ID. The value of the parameter corresponds to either the value of the operation_id parameter from the operation-history response, or, if the buyer’s account history is being requested, the value of the payment_id field from the process-payment response. |
status | string | Status of the payment (transfer). The parameter value matches the value of the status field in the response to the operation-history method. |
pattern_id | string | Payment Pattern ID. Present only for payments. |
direction | string | Direction of financial transaction. Can take the values:
|
amount | amount | Amount of the operation (amount deducted from the account). |
amount_due | amount | Amount to receive. Present for outgoing transfers to other users. |
fee | amount | Commission amount. Present for outgoing transfers to other users. |
datetime | datetime | Operation timestamp (date and time). |
title | string | Brief description of the operation (usually contains the merchant name or source of deposit). |
sender | string | Account number that funds were transferred from. Present for incoming transfers from other users. |
recipient | string | Identifier of the transfer recipient. Present for outgoing transfers to other users. |
recipient_type | string | Type of ID used for the transfer recipient. Possible values:
Present for outgoing transfers to other users. |
message | string | Message for the transfer recipient. Present for transfers to other users. |
comment | string | Comments on the transfer or deposit. Present in the history of the transfer sender or the deposit recipient. |
label | string | The payment label. Exists for incoming and outgoing transfers to other YooMoney users that had the label parameter set for the request-payment call. |
details | string | Detailed payment description. String in any format that may contain any symbols or line feeds. Optional parameter. |
type | string | The type of operation. For possible types of operations, see the description of the operation-history method. |
digital_goods | object | Data about a digital product (PIN codes and bonuses for games, iTunes, XBox, etc). This field is present for a successful payment to merchants of digital goods. For a description of the format, see the section Digital goods |
Response example for payment to a merchant
JSON
{ "operation_id": "1234567", "status": "success", "pattern_id": "2904", "amount": 500.00, "direction": "out", "datetime": "2011-07-11T20:43:00.000+04:00", "title": "Payment for ADSL access to the company My Provider", "details": "Prepayment for ADSL internet access to the company ООО \"XXX\"\nSubscriber account number: \n1234567/89\nAmount: 500.00\nTransaction number: 2000002967767", "type": "payment-shop" }
Example response for an outgoing transfer to another user
JSON
{ "operation_id": "1234567", "status": "success", "pattern_id": "p2p", "direction": "out", "amount": 50.25, "datetime": "2011-07-11T20:43:00.000+04:00", "title": "Transfer to account 4100123456789", "recipient": "4100123456789", "recipient_type": "account", "message": "Buy bagels", "comment": "Transfer from YooMoney user", "codepro": false, "details": "Recipient account:\n4100123456789\nAmount: 50.00 RUB", "type": "payment-shop" }
Error codes
If an error occurs, its code is returned:
Code | Description |
---|---|
illegal_param_operation_id | Invalid value for the operation_id parameter. |
All other values | Technical error; call the method again later. |
Response example for nonexistent operation request
JSON
{ "error": "illegal_param_operation_id" }