Operation import_batch_advanced

The operation of uploading a batch payment into the system.

Query parameters

ParameterValue
operationimport_batch_advanced
login<Username>
token<TOKEN>. Obtained after invoking get_token.
encrypted_passwordEncrypted password. It is obtained after user password RSA encryption with the use of a public exponent and the modulus obtained in invoking the get_token operation.
account_RURThe account used for payment in the corresponding RUR currency in the mass payment. If you do not pass the account number, one of your RUR currency accounts will be selected automatically.
account_USDThe account used for payment in the corresponding USD currency in the mass payment. If you do not pass the account number, one of your USD currency accounts will be selected automatically.
account_EURThe account used for payment in the corresponding EUR currency in the mass payment. If you do not pass the account number, one of your EUR currency accounts will be selected automatically.
account_<crypto accounts>You do not need to pass the crypto accounts. It will be selected automatically.
batchBatch data. Detailed description of the format can be found in the page with batch payments or in the corresponding page in the documentation.
verification_type

Confirmation method. May take values:

  • SIGNATURE — if the signature uses a private key (Certificate in the security settings should be activated)
  • MOBILE — in case of signature via SMS (SMS confirmation in security settings should be activated). In this case, a code will be sent to the phone number provided in activating the “SMS confirmation” (see process_batch).
verification_data

Confirmation data. Depends on the method of confirmation

  • If the confirmation method = SIGNATURE, the base64 encoded Signature should sent.The batch data is signed by an RSA algorithm (PKCS1) using the private key obtained in “Certificate activation”.
  • If the confirmation method = MOBILE, nothing is transmitted (see process_batch).

See also

Response in the CSV format

Format

Line No.Data format
10;<payment ID>;<sum_RUR>;<sum_USD>;<sum_EUR>;<sum_BTC>
2errors;<payment ID>;<errors count>
3, ..., nerrorAtLine;<error line number>;<error comment>

Values

ValueDescription
<payment ID>Mass payment identifier
<sum_RUR>The amount of the documents accepted for processing from an account in Rubles
<sum_USD>The amount of the documents accepted for processing from an account in US Dollars
<sum_EUR>The amount of the documents accepted for processing from an account in Euros
<sum_BTC> The amount of the documents accepted for processing from an account in Bitcoins
<error line number>Mass payment's error line number. First line associated with number 1
<error comment>Error details
<errors count>Errors count

Response examples

JSON (without mass payment errors)

{
  "code": 0,
  "message": "",
  "data": {
    "id": "3e6131a6-f55e-4a54-92a8-198e114dc92a",
    "summary": {
      "RUR": "0.00",
      "USD": "0.00",
      "EUR": "7.29",
      "BTC": "0.00"
    },
    "fee": {
      "RUR": "0.00",
      "USD": "0.00",
      "EUR": "0.15",
      "BTC": "0.00"
    },
    "nettoSummary": {
      "RUR": "0.00",
      "USD": "0.00",
      "EUR": "7.14",
      "BTC": "0.00"
    },
    "errors": []
  }
}

JSON (with payment errors)

{
  "code": 185,
  "message": "Ошибка импорта массового платежа. Сумма платежа равна нулю. Подробности в деталях платежа (см. также get_batch_info).",
  "data": {
    "id": "1318ee26-cc74-4dd5-a875-6c69957261e0",
    "errors": [
      {
        "line": 1,
        "comment": "Неверно задано значение поля Card number"
      }
    ]
  }
}

CSV (without mass payment errors)

0;938059f7-3680-4836-8c5c-53d5912556b9;1.20;0.00;0.00;0.00
errors;938059f7-3680-4836-8c5c-53d5912556b9;0

Please note that it is possible to have a partially successful import. Then the error code will be 0, but the number of erroneous records is not 0.

If all records were rejected, the error code will be 185.

If there was only one record and it resulted in one error, the error code would be 188, and the error text would contain the reason for rejecting the record.

CSV (with payment errors)

185;"Ошибка импорта массового платежа. Сумма платежа равна нулю. Подробности в деталях платежа (см. также get_batch_info)."
errors;0839e09e-4651-4ccd-a222-e1975a93a33c;1
errorAtLine;1;"Неверно задано значение поля Card number"