incoming-transfer-reject method

Description

Canceling incoming transfers with a secret code and deferred transfers. If the transfer is canceled, it is returned to the sender.

Required token permissions: incoming-transfers.

Input parameters

Parameter Type Description
operation_id string Identifier of the operation; the value of the operation_id parameter in the response to the operation-history method.

Returns

The method returns the following parameters:

Parameter Type Description
status string Operation result code (see the table).
error string Operation processing error code (additional description for the status field). Present only for errors.

Operation processing result codes:

Code Description
success The incoming transfer was refused successfully.
refused Refusal to perform the operation.

If an error occurred while processing the transaction, the error code is returned:

Code Description
illegal_param_operation_id Omitted or has an invalid value for the operation_id parameter. A transfer with this operation_id does not exist or has already been refused.
already_rejected The transfer was already rejected.

Examples

Request example:

POST /api/incoming-transfer-reject HTTP/1.1
Host: money.yandex.ru
Authorization: Bearer 410012345678901.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123
Content-Type: application/x-www-form-urlencoded
Content-Length: 20

operation_id=1234567

Example response when successful:

{
  "status":"success"
}

Example response if an invalid secret code was entered:

{
  "status":"refused",
  "error":"illegal_param_operation_id"
}