A
A
agent_22032021-09-25 01:24:05
Python
agent_2203, 2021-09-25 01:24:05

How to make a transfer to an account by nickname in pyqiwi?

I figured out how to transfer by number But when I want to transfer by nickname, I change the provider to the right one, but I get an error

wallet.send("99", "79111111111", 1)


File "/usr/lib/python3.9/site-packages/qiwipy-2.1.6-py3.9.egg/pyqiwi/__init__.py", line 268, in send
    result_json = apihelper.payments(self.token, pid, amount, recipient, comment=comment, fields=fields)
  File "/usr/lib/python3.9/site-packages/qiwipy-2.1.6-py3.9.egg/pyqiwi/apihelper.py", line 164, in payments
    return _make_request(token, api_method, method='post', json=body)
  File "/usr/lib/python3.9/site-packages/qiwipy-2.1.6-py3.9.egg/pyqiwi/apihelper.py", line 48, in _make_request
    return _check_result(method_name, result, passthru)
  File "/usr/lib/python3.9/site-packages/qiwipy-2.1.6-py3.9.egg/pyqiwi/apihelper.py", line 59, in _check_result
    raise exceptions.APIError(msg, method_name, response=result)
pyqiwi.exceptions.APIError: ('The server returned HTTP 400 Bad Request. Response body:\n[b\'{"code":"QWPRC-137","message":"\\xd0\\x98\\xd0\\xb7\\xd0\\xb2\\xd0\\xb8\\xd0\\xbd\\xd0\\xb8\\xd1\\x82\\xd0\\xb5, \\xd0\\xbf\\xd0\\xbb\\xd0\\xb0\\xd1\\x82\\xd0\\xb5\\xd0\\xb6 \\xd0\\xbd\\xd0\\xb0 \\xd0\\xbf\\xd1\\x80\\xd0\\xbe\\xd0\\xb2\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd1\\x80\\xd0\\xb0 \\xd0\\xb2 \\xd0\\xbd\\xd0\\xb0\\xd1\\x81\\xd1\\x82\\xd0\\xbe\\xd1\\x8f\\xd1\\x89\\xd0\\xb8\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xbc\\xd0\\xb5\\xd0\\xbd\\xd1\\x82 \\xd0\\xbd\\xd0\\xb5\\xd0\\xb2\\xd0\\xbe\\xd0\\xb7\\xd0\\xbc\\xd0\\xbe\\xd0\\xb6\\xd0\\xb5\\xd0\\xbd"}\']', 'payments')


Here is the code that I'm trying to run Do not tell me what I'm doing wrong? I looked at their documentation, but there are no more words about translations, it says change provider and account

wallet.send("99999", "NICKNAME", 1, comment=None)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lil.fxrrx, 2021-09-25
@mxrdxfxrrx

QIWI has a very truncated method with NICKNAMES, try to study all the parameters allowed for transfer (wallet (send)), perhaps there will be an answer to your question

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question