├── LICENSE
├── README.md
├── _balance_en.html.md
├── _balance_ru.html.md
├── _error_en.html.md
├── _error_ru.html.md
├── _master_ru.html.md
├── _payment_en.html.md
├── _payment_history_en.html.md
├── _payment_history_ru.html.md
├── _payment_ru.html.md
├── _profile_en.html.md
├── _profile_ru.html.md
├── _webhook_en.html.md
├── _webhook_ru.html.md
├── qiwi-wallet-personal_en.html.md
└── qiwi-wallet-personal_ru.html.md
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 QIWI Open API
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # qiwi-wallet-personal-docs
2 | API QIWI Кошелька позволяет автоматизировать выполнение платежей и получение отчетов о платежах, информации о вашем счёте в [сервисе QIWI Кошелек](https://qiwi.com).
3 |
4 | Методы API доступны после регистрации пользователя в [сервисе QIWI Кошелек](https://qiwi.com).
5 |
6 |
--------------------------------------------------------------------------------
/_balance_en.html.md:
--------------------------------------------------------------------------------
1 | # Wallet Balances API {#balance}
2 |
3 | ###### [Edit on GitHub](https://github.com/QIWI-API/qiwi-wallet-personal-docs/blob/master/_balance_en.html.md)
4 |
5 | API provides methods to control balances of your QIWI wallet.
6 |
7 | ## List of balances {#balances_list}
8 |
9 | Provides current balances of your QIWI Wallet.
10 |
11 | [Interactive API](https://developer.qiwi.com/sandbox/index.html#!/account-controller-v-2/getByAliasUsingGET_1)
12 |
13 |
186 |
187 | Name|Type|Description
188 | --------|----|----
189 | alias|String| Alias of the new account (taken from [Available accounts](#funding_offer))
190 |
191 |
Response ←
192 |
193 | ~~~http
194 | HTTP/1.1 201 Created
195 | ~~~
196 |
197 | Successful response contains HTTP code `201`.
198 |
199 | ## Available accounts {#funding_offer}
200 |
201 | Provides all possible account aliases for your QIWI wallet.
202 |
203 | [Interactive API](https://developer.qiwi.com/sandbox/index.html#!/account-controller-v-2/getAccountsOfferUsingGET)
204 |
205 |
accountAlias - псевдоним счета в кошельке из списка счетов (параметр accounts[].alias в ответе)
287 |
288 |
289 |
290 |
291 |
292 |
HEADERS
293 |
294 |
Accept: application/json
295 |
Content-type: application/json
296 |
Authorization: Bearer ***
297 |
298 |
299 |
300 |
301 |
302 |
Параметры
Параметр передается в JSON-теле запроса:
303 |
304 |
305 |
306 | Название|Тип|Описание
307 | --------|----|----
308 | defaultAccount|Boolean| Признак установки счета по умолчанию
309 |
310 |
Ответ ←
311 |
312 | ~~~http
313 | HTTP/1.1 204 Modified
314 | ~~~
315 |
316 | Успешный ответ содержит HTTP-код `204`.
317 |
--------------------------------------------------------------------------------
/_error_en.html.md:
--------------------------------------------------------------------------------
1 | # Error Codes {#errors}
2 |
3 | API returns the following HTTP codes in case of errors.
4 |
5 | HTTP code | API | Description
6 | ---|-----|---------
7 | 400 | All | Wrong data format of request
8 | 401 | All | Wrong API token or token expired
9 | 403 | All | Not enough rights of API token for the request
10 | 404 | [Payments history](#payments_history), [Transaction info](#txn_info), [Receipt](#payment_receipt) | Transaction not found or no payments with such data
11 | 404 | [Balances](#balance), [User's profile](#profile), [Identification](#identification) | Wallet not found
12 | 404 | [Callbacks](#webhook) | Active webhook not found
13 | 404 | [Pay/Cancel invoice](#paywallet_invoice) | Invoice not found
14 | 422 | [Webhook registration](#hook_reg) | Wrong domain/subnet/host in new webhook URL, wrong webhook type or transactions type, or webhook already exists and is active
15 | 423 | All | Too many requests, service temporary unavailable
16 | 500 | All | Internal service error (webhook URL too long, infrastructure maintenance, resource is unavailable and so on)
17 |
18 |
19 |
20 | The following errors return in `errorCode` field in responses to [payments history](#payments_history) and [transaction info](#txn_info) requests:
21 |
22 | errorCode | Description
23 | ----|------
24 | 0 |OK
25 | 3 |Technical error. Repeat the request later
26 | 4 |Incorrect format of phone or account number. Check the data
27 | 5 |No such number. Check the data and try again
28 | 8 |Technical problem on the recipient's bank side. Try again later
29 | 57 | Recipient's wallet status not allowing the money transfer. Ask them to enter passport data in QIWI Wallet to increase status level.
30 | 131 |Payment type unavailable for your country
31 | 166 |Your wallet status not allowing the money transfer. Enter passport data in QIWI Wallet to increase status level.
32 | 167 |Recipient's wallet status not allowing the money transfer. Ask them to enter passport data in QIWI Wallet to increase status level.
33 | 202 |Technical error. Repeat the payment later
34 | 204 |Your wallet status not allowing the cash topup. Enter passport data in QIWI Wallet to increase status level.
35 | 220 |Not enough funds. Replenish your wallet
36 | 241 |Payment amount must be larger than 1 ruble
37 | 242 |Payment amount larger than maximum allowed
38 | 254 |Payment amount must be larger than 1 ruble
39 | 271 |Technical issue on the recipient's bank side. Try again later
40 | 300 |Technical error. Repeat the payment later
41 | 303 |Wrong phone number - enter 10 digits
42 | 319 |Your wallet status not allowing the money transfer. Enter passport data in QIWI Wallet to increase status level.
43 | 407 |Not enough funds on your card
44 | 408 |You already have the same payment - pay or cancel it
45 | 455 |Payment is not possible due to limit on minimum balance
46 | 461 |Time to confirm operation is expired. Try again later
47 | 472 |Not enough funds on your wallet - replenish it
48 | 500 |Technical error on the recipient's bank side. Contact the bank's Support service
49 | 522 |Recipient's card wrong number or expiration date. Check data and try again
50 | 547 |Recipient's card wrong expiration date. Check data and try again
51 | 548 |Recipient's card expired
52 | 558 |Payment amount larger than maximum allowed
53 | 561 |Bank where the money is transferring does not accept the payment. Contact the bank's Support service
54 | 700 |Limit for your wallet current status is exceeded. Increase your status level or check your current limit in [Profile section](https://qiwi.com/settings)
55 | 702 |Payment is not possible due to recipient's limit. Its balance's limit is exceeded. Recipient has to contact with our Support
56 | 704 |The monthly limit on your wallet has been exceeded. To remove the restrictions, increase your wallet status in [Profile section](https://qiwi.com/settings)
57 | 705 |The monthly limit on your wallet has been exceeded. To remove the restrictions, increase your wallet status in [Profile section](https://qiwi.com/settings)
58 | 710 | Transfer is not possible - the weekly limit of payments for the same recipient have been exceeded
59 | 711 | Transfer is not possible. You have exceeded the monthly payment limit for such transactions
60 | 716 |You have exceeded the monthly limit on withdrawals from the card. To remove the restrictions, increase your wallet status in [Profile section](https://qiwi.com/settings)
61 | 717 |You have exceeded the daily limit on withdrawals from the card. To remove the restrictions, increase your wallet status in [Profile section](https://qiwi.com/settings)
62 | 746 |Transfer is impossible - the limit for the same recipient has been exceeded
63 | 747 |Transfer is not possible. The number of operations for the same recipient has been exceeded
64 | 749 |Technical error. Contact our Support
65 | 750 |Technical error. Repeat the payment later
66 | 757 |The limit on the number of payments has been exceeded. To remove the restrictions, increase your wallet status in [Profile section](https://qiwi.com/settings)
67 | 797 |Payment has been cancelled, the money is returned to your wallet
68 | 852 |Transfer is impossible - the limit for the same recipient has been exceeded
69 | 866 |Payment not processed. Limit on outgoing transfers has been exceeded - 5 000 RUB from RUB, USD, EUR accounts to KZT monthly. Increase your wallet status in [Profile section](https://qiwi.com/settings) and pay without limits
70 | 867 |Payment not processed. Limit on incoming transfers has been exceeded - 5 000 RUB from RUB, USD, EUR accounts to KZT monthly. Increase your wallet status in [Profile section](https://qiwi.com/settings) and pay without limits
71 | 893 |Transfer rejected. Date is expired
72 | 901 |The code to confirm the payment has expired. Repeat the payment
73 | 943 |The limit on transfers per month is exceeded. Increase your wallet status in [Profile section](https://qiwi.com/settings) and transfer without restrictions
74 | 1050 |The limit on such operations is exceeded. Increase your wallet status in [Profile section](https://qiwi.com/settings) and expand your options
75 | 7000 |Payment rejected. Check card's details and repeat the payment
76 | 7600 |Payment rejected. Contact the bank that issued the card
77 | |
78 | |
79 | |
80 |
--------------------------------------------------------------------------------
/_error_ru.html.md:
--------------------------------------------------------------------------------
1 | # Коды ошибок {#errors}
2 |
3 | ###### [Этот раздел на GitHub](https://github.com/QIWI-API/qiwi-wallet-personal-docs/blob/master/_error_ru.html.md)
4 |
5 | В случае ошибки API возвращается HTTP-код ошибки.
6 |
7 | HTTP Код | Секция API | Описание
8 | ---|-----|---------
9 | 400 | Все | Ошибка синтаксиса запроса (неправильный формат данных)
10 | 401 | Все | Неверный токен или истек срок действия токена API
11 | 403 | Все | Нет прав на этот запрос (недостаточно разрешений у токена API)
12 | 404 | [История платежей](#payments_history), [Информация о транзакции](#txn_info), [Отправка квитанции](#payment_receipt) | Не найдена транзакция или отсутствуют платежи с указанными признаками
13 | 404 | [Балансы](#balance), [Профиль пользователя](#profile), [Идентификация пользователя](#identification) | Не найден кошелек
14 | 404 | [Веб-хуки](#webhook) | Не найден активный веб-хук
15 | 404 | [Оплата/Отмена счета](#paywallet_invoice) | Не найден счет
16 | 422 | [Регистрация веб-хука](#hook_reg) | Неправильно указаны домен/подсеть/хост веб-хука (в параметре `param` для URL веб-хука), неправильно указаны тип хука или тип транзакции, попытка создать хук при наличии уже созданного
17 | 423 | Все | Слишком много запросов, сервис временно недоступен
18 | 500 | Все | Внутренняя ошибка сервиса (превышена длина URL веб-хука, проблемы с инфраструктурой, недоступность каких-либо ресурсов и т.д.)
19 |
20 |
21 | Следующие ошибки возвращаются на запросы [истории платежей](#payments_history) и [информации о транзакции](#txn_info) в параметре `errorCode` ответа:
22 |
23 | errorCode | Описание
24 | ----|------
25 | 0 |OK
26 | 3 |Техническая ошибка. Повторите платеж позже.
27 | 4 |Некорректный формат телефона или счета. Проверьте данные.
28 | 5 |Данного номера не существует. Проверьте данные и попробуйте еще раз.
29 | 8 |Техническая проблема на стороне банка-получателя. Попробуйте позже.
30 | 57 |Статус кошелька получателя не позволяет перевести ему деньги. Попросите владельца кошелька повысить его статус: укажите паспортные данные.
31 | 131 |Платеж недоступен для вашей страны
32 | 166 |Ваш статус кошелька не позволяет совершить платеж. Повысьте статус кошелька: укажите паспортные данные.
33 | 167 |Статус кошелька получателя не позволяет перевести ему деньги. Попросите владельца кошелька повысить его статус: указать паспортные данные.
34 | 202 |Техническая ошибка. Повторите платеж позже.
35 | 204 |Ваш статус кошелька не позволяет пополнять его наличными. Повысьте статус кошелька: укажите паспортные данные.
36 | 220 |Недостаточно средств. Пополните кошелек
37 | 241 |Сумма платежа должна быть больше 1 рубля
38 | 242 |Сумма платежа превышает максимально допустимую
39 | 254 |Сумма платежа должна быть больше 1 рубля
40 | 271 |Техническая проблема на стороне банка-получателя. Попробуйте позже.
41 | 300 |Техническая ошибка. Повторите платеж позже.
42 | 303 |Неверный номер телефона — должно быть 10 цифр
43 | 319 |Ваш статус кошелька не позволяет совершить платеж. Повысьте статус кошелька: укажите паспортные данные.
44 | 407 |Недостаточно средств на вашей карте
45 | 408 |У вас уже есть такой платеж — оплатите или отмените его
46 | 455 |Платеж невозможен из-за ограничений на минимальный остаток
47 | 461 |Время подтверждения операции истекло. Попробуйте еще раз.
48 | 472 |Недостаточно денег на кошельке — пополните его
49 | 500 |Техническая ошибка на стороне банка-получателя. Обратитесь в их поддержку.
50 | 522 |Неверный номер или срок действия карты получателя. Проверьте данные и повторите попытку.
51 | 547 |Неверный срок действия карты получателя. Проверьте данные и повторите попытку.
52 | 548 |Истек срок действия карты получателя
53 | 558 |Сумма платежа превышает максимально допустимую
54 | 561 |Банк, куда вы переводите деньги, не принимает платеж. Обратитесь в его поддержку.
55 | 700 |Превышен лимит для вашего статуса кошелька. Повысьте статус или уточните свой текущий лимит в [разделе Профиль](https://qiwi.com/settings).
56 | 702 |Платеж невозможен из-за ограничений у получателя. Превышен его лимит на остаток. Получателю необходимо связаться с нашей поддержкой.
57 | 704 |Превышен ежемесячный лимит по вашему кошельку. Чтобы снять ограничения, повысьте статус кошелька в [Профиле](https://qiwi.com/settings).
58 | 705 |Превышен ежемесячный лимит по вашему кошельку. Чтобы снять ограничения, повысьте статус кошелька в [Профиле](https://qiwi.com/settings).
59 | 710 |Перевод невозможен – превышен лимит платежей за неделю в пользу одного и того же получателя
60 | 711 |Перевод невозможен. Вы превысили лимит платежей для таких операций за месяц.
61 | 716 |Вы превысили месячный лимит на снятие денег с карты. Чтобы снять ограничения, повысьте статус кошелька в [Профиле](https://qiwi.com/settings).
62 | 717 |Вы превысили дневной лимит на снятие денег с карты. Чтобы снять ограничения, повысьте статус кошелька в [Профиле](https://qiwi.com/settings).
63 | 746 |Перевод невозможен – превышен лимит в пользу одного и того же получателя
64 | 747 |Перевод невозможен. Превышено количество операций в пользу одного и того же получателя.
65 | 749 |Техническая ошибка. Обратитесь в нашу поддержку.
66 | 750 |Техническая ошибка. Повторите платеж позже.
67 | 757 |Превышен лимит на количество платежей. Чтобы снять ограничения, повысьте статус кошелька в [Профиле](https://qiwi.com/settings).
68 | 797 |Платеж был отменен, деньги возвращены на ваш кошелек
69 | 852 |Перевод невозможен – превышен лимит в пользу одного и того же получателя
70 | 866 |Платеж не проведен. Превышен лимит 5 000 RUB — на исходящие переводы из RUB, USD, EUR в KZT в месяц. Повысьте статус кошелька в [Профиле](https://qiwi.com/settings) и платите без ограничений.
71 | 867 |Платеж не проведен. Превышен лимит 5 000 RUB — на входящие переводы из RUB, USD, EUR в KZT в месяц. Повысьте статус кошелька в [Профиле](https://qiwi.com/settings) и платите без ограничений.
72 | 893 |Перевод отклонен. Истек его срок действия.
73 | 901 |Истек срок действия кода для подтверждения платежа. Повторите платеж.
74 | 943 |Превышен лимит на переводы в месяц. Повысьте статус кошелька в [Профиле](https://qiwi.com/settings) и переводите без ограничений.
75 | 1050 |Превышен лимит на такие операции. Повысьте статус кошелька в [Профиле](https://qiwi.com/settings) и расширьте свои возможности.
76 | 7000 |Платеж отклонен. Проверьте реквизиты карты и повторите платеж.
77 | 7600 |Платеж отклонен. Обратитесь в банк, выпустивший карту.
78 | |
79 | |
80 | |
81 |
--------------------------------------------------------------------------------
/_master_ru.html.md:
--------------------------------------------------------------------------------
1 | # API QIWI Мастер {#qiwi-master}
2 |
3 | ###### [Предложить правки на GitHub](https://github.com/QIWI-API/qiwi-wallet-personal-docs/blob/master/_master_ru.html.md)
4 |
5 | API дает доступ к управлению пакетом услуг [QIWI Мастер](https://qiwi.com/qvc-master). Пакет услуг позволяет выпускать до пяти бесплатных виртуальных карт QIWI и перевыпускать карты неограниченное число раз. Выпуск карт сверх указанного количества оплачивается по [тарифу](https://static.qiwi.com/qcms/files/1582791401478_5_JJ5vJe1L0szXzKb.pdf).
6 |
7 | Доступны два типа карт:
8 |
9 | * QIWI Мастер Prepaid – для оплаты рекламы в сервисах Яндекс.Директ и myTarget;
10 | * QIWI Мастер Debit – новый дебетовый БИН.
11 |
12 | Для вызова методов API вам потребуется токен API QIWI Wallet с разрешениями на следующие действия:
13 |
14 | * *Управление виртуальными картами*,
15 | * *Запрос информации о профиле кошелька*,
16 | * *Просмотр истории платежей*,
17 | * *Проведение платежей без SMS*.
18 |
19 | Отметьте указанные разрешения при [выпуске токена API QIWI Wallet](#auth_data).
20 |
21 | 
22 |
23 | См. также [Пошаговое руководство по интеграции API QIWI Мастер](/ru/qiwi-wallet-api-master-guide/#how-to-use).
24 |
25 | С помощью методов API вы можете:
26 |
27 | * [Выпустить карту QIWI Мастер](#qiwi-master-issue-card).
28 | * [Получить список ваших карт QIWI Мастер](#qiwi-master-list).
29 | * [Получить выписку транзакций по карте](#card-payments).
30 | * [Заблокировать](#card-block) и [разблокировать](#card-unblock) карту.
31 | * [Получить реквизиты карты](#card-details).
32 | * [Переименовать карту](#qvc-rename).
33 |
34 | Чтобы начать работу с API, необходимо [приобрести пакет QIWI Мастер](#buy-qiwi-master).
35 |
36 | ## Покупка пакета QIWI Мастер {#buy-qiwi-master}
37 |
38 |
101 |
102 | Name | Type | Description
103 | --------|----|----
104 | rows | Integer | The number of payments in response to break down the report into chunks. It must be from 1 to 50. The request returns a specified number of payments in reverse chronological order, starting from the current date or date in the `startDate` option. **Required**
105 | operation|String| The type of operations in the report, for selection. Acceptable values: `ALL` - all transactions, `IN` - only top-ups, `OUT` - only payments, `QIWI_CARD` - only payments from QIWI cards (QVC, QVP). By default, `ALL` is used
106 | sources|Array[String]| A list of payment sources for the filter. Each source is numbered from scratch (`sources[0]`, `sources[1]` etc). Acceptable values: `QW_RUB` - ruble account of your QIWI wallet, `QW_USD` - USD account of your QIWI wallet, `QW_EUR` - euro account of your QIWI wallet, `CARD` - cards linked to the wallet and other credit cards, `MK` - the corresponding account on the mobile operator. If not specified, all sources are considering
107 | startDate | DateTime URL-encoded| The initial date for the search for payments. **It is only used with `endDate`. The maximum allowable interval between `startDate` and `endDate` is 90 calendar days.** By default, equal to the daily shift from the current date to Moscow time. The date can be specified in any time zone `TZD` (in `YYYY-MM-DD'T'hh:mm:ssTZD` format), but it must coincide with the time zone in the `endDate` parameter. Timezone designation: `+hh:mm` or -`hh:mm` (time shift from GMT).
108 | endDate | DateTime URL-encoded | The final date for the search for payments. **It is only used with `startDate`. The maximum allowable interval between `startDate` and `endDate` is 90 calendar days.** By default, equal to current date/time in Moscow time. The date can be specified in any time zone `TZD` (in `YYYY-MM-DD'T'hh:mm:ssTZD` format), but it must coincide with the time zone in the `startDate` parameter. Timezone designation: `+hh:mm` or -`hh:mm` (time shift from GMT).
109 | nextTxnDate | DateTime URL-encoded| The transaction date to start the report (should be equal to `nextTxnDate` in the previous report). **Used only with `nextTxnId`**
110 | nextTxnId | Long | The transaction number to start the report (should be equal to `nextTxnId` in the previous report). **Used only with `nextTxnDate`**
111 |
112 |
Response ←
113 |
114 | ~~~http
115 | HTTP/1.1 200 OK
116 | Content-Type: application/json
117 | ~~~
118 |
119 | ~~~json
120 | {"data":
121 | [{
122 | "txnId":9309,
123 | "personId":79112223344,
124 | "date":"2017-01-21T11:41:07+03:00",
125 | "errorCode":0,
126 | "error":null,
127 | "status":"SUCCESS",
128 | "type":"OUT",
129 | "statusText":"Успешно",
130 | "trmTxnId":"1489826461807",
131 | "account":"0003***",
132 | "sum":{
133 | "amount":70,
134 | "currency":643
135 | },
136 | "commission":{
137 | "amount":0,
138 | "currency":643
139 | },
140 | "total":{
141 | "amount":70,
142 | "currency":643
143 | },
144 | "provider":{
145 | ...
146 | },
147 | "source": {},
148 | "comment":"",
149 | "currencyRate":1
150 | }],
151 | "nextTxnId":9001,
152 | "nextTxnDate":"2017-01-31T15:24:10+03:00"
153 | }
154 | ~~~
155 |
156 | ~~~python
157 | mylogin = '79999999999'
158 | api_access_token = '975efd8e8376xxxb95fa7cb213xxx04'
159 |
160 | # last 20 payments
161 | lastPayments = payment_history_last(mylogin, api_access_token, '5','','')
162 |
163 | # date and time of the next payment (to use in the next request)
164 | nextTxnDate = lastPayments['nextTxnDate']
165 |
166 | # transaction id of the next payment (to use in the next request)
167 | nextTxnId = lastPayments['nextTxnId']
168 |
169 | # the most recent and next n payments
170 | orderedPayments = payment_history_last(mylogin, api_access_token, '5', nextTxnId, nextTxnDate)
171 | ~~~
172 |
173 | Successful JSON-response contains a list of payments corresponding to the request's filter:
174 |
175 |
176 |
177 | Field|Type|Description
178 | --------|----|----
179 | data|Array[Object]| A list of [PaymentHistoryItem objects](#payment-history-item). Number of objects in the list is less than or equals to `rows` value from the request
180 | nextTxnId|Number(Integer)| Next transaction ID, in the complete list of your transactions
181 | nextTxnDate|DateTime| Next transaction date/time, in the complete list of your transactions, Moscow time (in `YYYY-MM-DD'T'hh:mm:ss+03:00`)
182 |
183 | ## Statistics {#stat}
184 |
185 | Provides aggregate statistics on the amount of payments for a given period.
186 |
187 | [Interactive API](https://developer.qiwi.com/sandbox/index.html#!/payment-history-controller-v-2/getPaymentHistoryTotalByUserUsingGET_1)
188 |
189 |
190 |
191 |
wallet - the number of your QIWI wallet without + sign
222 |
223 |
224 |
225 |
226 |
227 |
HEADERS
228 |
229 |
Accept: application/json
230 |
Authorization: Bearer ***
231 |
232 |
233 |
234 |
235 |
236 |
Parameters
Send them in the query path:
237 |
238 |
239 |
240 | Name| Type | Description
241 | --------|----|-------
242 | startDate|DateTime URL-encoded | Start date of the period, in any time zone `TZD` (date format `YYYY-MM-DD'T'hh:mm:ssTZD`). Time zone must coincide with `endDate` time zone. Designation `TZD`: `+hh:mm` or -`hh:mm` (time shift from GMT). **Required**
243 | endDate|DateTime URL-encoded| Final date of th period, in any time zone `TZD` (date format `YYYY-MM-DD'T'hh:mm:ssTZD`). Time zone must coincide with `startDate` time zone. Designation `TZD`: `+hh:mm` or -`hh:mm` (time shift from GMT). **Required**
244 | operation|String| Operations to take into account when accumulating statistics. Possible values: `ALL` - all operations, `IN` - only top-ups, `OUT` - only payments, `QIWI_CARD` - only payments from QIWI cards (QVC, QVP). Default value is `ALL`.
245 | sources|Array[String]|Payment sources to filter data. Each source is enumerated starting from zero (`sources[0]`, `sources[1]` and so on). Possible values of each source: `QW_RUB` - ruble QIWI Wallet account, `QW_USD` - USD QIWI Wallet account, `QW_EUR` - euro QIWI Wallet account, `CARD` - credit cards, both linked to QIWI Wallet and others, `MK` - mobile operator account. If not specified, all sources are collected.
246 |
247 |
Response ←
248 |
249 | ~~~http
250 | HTTP/1.1 200 OK
251 | Content-Type: application/json
252 | ~~~
253 |
254 | ~~~json
255 | {
256 | "incomingTotal":[
257 | {
258 | "amount":3500,
259 | "currency":643
260 | }
261 | ],
262 | "outgoingTotal":[
263 | {
264 | "amount":3497.5,
265 | "currency":643
266 | }
267 | ]
268 | }
269 | ~~~
270 |
271 | ~~~python
272 | mylogin = '79999999999'
273 | api_access_token = '975efd8e8376xxxb95fa7cb213xxx04'
274 |
275 | # Payments amount from April 12 till July 11
276 | print(payment_history_summ_dates(mylogin, api_access_token, '2019-04-12T00:00:00Z','2019-07-11T23:59:59Z'))
277 |
278 | {'incomingTotal': [{'amount': 3.33, 'currency': 840},
279 | {'amount': 3481, 'currency': 643}],
280 | 'outgoingTotal': [{'amount': 3989.98, 'currency': 643},
281 | {'amount': 3.33, 'currency': 840}]}
282 | ~~~
283 |
284 | Successful JSON-response contains statistics data for a specified period:
285 |
286 | Field| Type | Description
287 | --------|----|----
288 | incomingTotal|Array[Object]| Array of total amounts of incoming payments (top-up payments) separated by payment's currency
289 | incomingTotal[].amount | Number(Decimal) |Top-ups amount for the period
290 | incomingTotal[].currency|Number(3)| Currency of the operations (ISO-4217)
291 | outgoingTotal|Array[Object]| Array of total amounts of payments separated by payment's currency
292 | outgoingTotal[].amount | Number(Decimal) | Payments amount for the period
293 | outgoingTotal[].currency|Number(3)| Currency of the operations (ISO-4217)
294 |
295 | ## Transaction details {#txn_info}
296 |
297 | Returns details on a specific transaction from your payments history.
298 |
299 | [Interactive API](https://developer.qiwi.com/sandbox/index.html#!/payment-history-controller-v-2/getPaymentHistoryByTransactionUsingGET_1)
300 |
301 |
Данные параметры передаются в строке запроса:
97 |
98 |
99 |
100 | Название|Тип|Описание
101 | --------|----|----
102 | rows | Integer |Число платежей в ответе, для разбивки отчета на страницы. Целое число от 1 до 50. Запрос возвращает указанное число платежей в обратном хронологическом порядке, начиная от текущей даты или даты в параметре `startDate`. **Обязательный параметр**
103 | operation|String| Тип операций в отчете, для отбора. Допустимые значения: `ALL` - все операции, `IN` - только пополнения, `OUT` - только платежи, `QIWI_CARD` - только платежи по картам QIWI (QVC, QVP). По умолчанию `ALL`
104 | sources|Array[String]|Список источников платежа, для фильтра. Каждый источник нумеруется, начиная с нуля (`sources[0]`, `sources[1]` и т.д.). Допустимые значения: `QW_RUB` - рублевый счет кошелька, `QW_USD` - счет кошелька в долларах, `QW_EUR` - счет кошелька в евро, `CARD` - привязанные и непривязанные к кошельку банковские карты, `MK` - счет мобильного оператора. Если не указан, учитываются все источники
105 | startDate | DateTime URL-encoded| Начальная дата поиска платежей. **Используется только вместе с `endDate`. Максимальный допустимый интервал между `startDate` и `endDate` - 90 календарных дней.** По умолчанию, равна суточному сдвигу от текущей даты по московскому времени. Дату можно указать в любой временной зоне `TZD` (формат `ГГГГ-ММ-ДД'T'чч:мм:ссTZD`), однако она должна совпадать с временной зоной в параметре `endDate`. Обозначение временной зоны `TZD`: `+чч:мм` или -`чч:мм` (временной сдвиг от GMT).
106 | endDate | DateTime URL-encoded | Конечная дата поиска платежей. **Используется только вместе со `startDate`. Максимальный допустимый интервал между `startDate` и `endDate` - 90 календарных дней.** По умолчанию, равна текущим дате/времени по московскому времени. Дату можно указать в любой временной зоне `TZD` (формат `ГГГГ-ММ-ДД'T'чч:мм:ссTZD`), однако она должна совпадать с временной зоной в параметре `startDate`. Обозначение временной зоны `TZD`: `+чч:мм` или -`чч:мм` (временной сдвиг от GMT).
107 | nextTxnDate | DateTime URL-encoded| Дата транзакции для начала отчета (должна быть равна параметру `nextTxnDate` в предыдущем списке). Используется для продолжения списка, разбитого на страницы. **Используется только вместе с `nextTxnId`**
108 | nextTxnId | Long | Номер транзакции для начала отчета (должен быть равен параметру `nextTxnId` в предыдущем списке). Используется для продолжения списка, разбитого на страницы. **Используется только вместе с `nextTxnDate`**
109 |
110 |
Ответ ←
111 |
112 | ~~~http
113 | HTTP/1.1 200 OK
114 | Content-Type: application/json
115 | ~~~
116 |
117 | ~~~json
118 | {"data":
119 | [
120 | {
121 | "txnId":9309,
122 | "personId":79112223344,
123 | "date":"2017-01-21T11:41:07+03:00",
124 | "errorCode":0,
125 | "error":null,
126 | "status":"SUCCESS",
127 | "type":"OUT",
128 | "statusText":"Успешно",
129 | "trmTxnId":"1489826461807",
130 | "account":"0003***",
131 | "sum":{
132 | "amount":70,
133 | "currency":643
134 | },
135 | "commission":{
136 | "amount":0,
137 | "currency":643
138 | },
139 | "total":{
140 | "amount":70,
141 | "currency":643
142 | },
143 | "provider":{
144 | ...
145 | },
146 | "source": {},
147 | "comment":"",
148 | "currencyRate":1
149 | ],
150 | "nextTxnId":9001,
151 | "nextTxnDate":"2017-01-31T15:24:10+03:00"
152 | }
153 | ~~~
154 |
155 | ~~~python
156 | mylogin = '79999999999'
157 | api_access_token = '975efd8e8376xxxb95fa7cb213xxx04'
158 |
159 | # последние 20 платежей
160 | lastPayments = payment_history_last(mylogin, api_access_token, '5','','')
161 |
162 | # дата и время следующего платежа
163 | nextTxnDate = lastPayments['nextTxnDate']
164 |
165 | # id транзакции следующего платежа
166 | nextTxnId = lastPayments['nextTxnId']
167 |
168 | # История платежей - последние и следующие n платежей
169 | orderedPayments = payment_history_last(mylogin, api_access_token, '5', nextTxnId, nextTxnDate)
170 | ~~~
171 |
172 | Успешный JSON-ответ содержит список платежей из истории кошелька, соответствующих заданному фильтру:
173 |
174 |
175 |
176 | Поле ответа|Тип|Описание
177 | --------|----|----
178 | data|Array[Object]|Список [объектов PaymentHistoryItem](#payment-history-item). Число объектов в списке меньше или равно параметру `rows` из запроса
179 | nextTxnId|Number(Integer)|ID следующего платежа в полном списке
180 | nextTxnDate|DateTime|Дата/время следующего платежа в полном списке, время московское (в формате `ГГГГ-ММ-ДД'T'чч:мм:сс+03:00`)
181 |
182 | ## Статистика платежей {#stat}
183 |
184 | Запрос используется для получения сводной статистики по суммам платежей за указанный период.
185 |
186 | [Потестировать](https://developer.qiwi.com/sandbox/index.html#!/payment-history-controller-v-2/getPaymentHistoryTotalByUserUsingGET_1)
187 |
188 |
189 |
190 |
Данные параметры передаются в строке запроса:
236 |
237 |
238 |
239 | Название|Тип |Описание
240 | --------|----|-------
241 | startDate|DateTime URL-encoded | Начальная дата периода статистики. Дату можно указать в любой временной зоне `TZD` (формат `ГГГГ-ММ-ДД'T'чч:мм:ссTZD`), однако она должна совпадать с временной зоной в параметре `endDate`. Обозначение временной зоны `TZD`: `+чч:мм` или -`чч:мм` (временной сдвиг от GMT). **Обязательный параметр**
242 | endDate|DateTime URL-encoded| Конечная дата периода статистики. Дату можно указать в любой временной зоне `TZD` (формат `ГГГГ-ММ-ДД'T'чч:мм:ссTZD`), однако она должна совпадать с временной зоной в параметре `startDate`. Обозначение временной зоны `TZD`: `+чч:мм` или -`чч:мм` (временной сдвиг от GMT). **Обязательный параметр**
243 | operation|String| Тип операций, учитываемых при подсчете статистики. Допустимые значения: `ALL` - все операции, `IN` - только пополнения, `OUT` - только платежи, `QIWI_CARD` - только платежи по картам QIWI (QVC, QVP). По умолчанию `ALL`.
244 | sources|Array[String]|Источники платежа, по которым вернутся данные. Каждый источник нумеруется, начиная с нуля (`sources[0]`, `sources[1]` и т.д.). Допустимые значения: `QW_RUB` - рублевый счет кошелька, `QW_USD` - счет кошелька в долларах, `QW_EUR` - счет кошелька в евро, `CARD` - привязанные и непривязанные к кошельку банковские карты, `MK` - счет мобильного оператора. Если не указан, учитываются все источники платежа.
245 |
246 |
Ответ ←
247 |
248 | ~~~http
249 | HTTP/1.1 200 OK
250 | Content-Type: application/json
251 | ~~~
252 |
253 | ~~~json
254 | {
255 | "incomingTotal":[
256 | {
257 | "amount":3500,
258 | "currency":643
259 | }
260 | ],
261 | "outgoingTotal":[
262 | {
263 | "amount":3497.5,
264 | "currency":643
265 | }
266 | ]
267 | }
268 | ~~~
269 |
270 | ~~~python
271 | mylogin = '79999999999'
272 | api_access_token = '975efd8e8376xxxb95fa7cb213xxx04'
273 |
274 | # История платежей - сумма за диапазон
275 | # не более 90 дней с 12 апреля по 11 июля 2019 года
276 | print(payment_history_summ_dates(mylogin, api_access_token, '2019-04-12T00:00:00Z','2019-07-11T23:59:59Z'))
277 |
278 | {'incomingTotal': [{'amount': 3.33, 'currency': 840},
279 | {'amount': 3481, 'currency': 643}],
280 | 'outgoingTotal': [{'amount': 3989.98, 'currency': 643},
281 | {'amount': 3.33, 'currency': 840}]}
282 | ~~~
283 |
284 | Успешный JSON-ответ содержит статистику платежей за выбранный период:
285 |
286 | Поле ответа|Тип|Описание
287 | --------|----|----
288 | incomingTotal|Array[Object]|Массив данных о суммах входящих платежей (пополнениях) по каждой валюте
289 | incomingTotal[].amount | Number(Decimal) |Сумма пополнений за период
290 | incomingTotal[].currency|Number(3)|Код валюты пополнений (ISO-4217)
291 | outgoingTotal|Array[Object]|Массив данных о суммах исходящих платежей по каждой валюте
292 | outgoingTotal[].amount | Number(Decimal) |Сумма платежей за период
293 | outgoingTotal[].currency|Number(3)|Код валюты платежей (ISO-4217)
294 |
295 | ## Информация о транзакции {#txn_info}
296 |
297 | Запрос используется для получения информации по определенной транзакции из вашей истории платежей.
298 |
299 | [Потестировать](https://developer.qiwi.com/sandbox/index.html#!/payment-history-controller-v-2/getPaymentHistoryByTransactionUsingGET_1)
300 |
301 |
These options are transmitted in the URL query:
65 |
66 |
67 |
68 | Name|Type |Description
69 | --------|----|-------
70 | authInfoEnabled|Boolean | Flag to get authorization settings. By default, `true`
71 | contractInfoEnabled|Boolean | Flag to get your QIWI wallet data. By default, `true`
72 | userInfoEnabled|Boolean | Flag to get other user data. By default, `true`
73 |
74 |
Response ←
75 |
76 | ~~~http
77 | HTTP/1.1 200 OK
78 | Content-Type: application/json
79 |
80 | {
81 | "authInfo": {
82 | "boundEmail": "m@ya.ru",
83 | "ip": "81.210.201.22",
84 | "lastLoginDate": "2017-07-27T06:51:06.099Z",
85 | "mobilePinInfo": {
86 | "lastMobilePinChange": "2017-07-13T11:22:06.099Z",
87 | "mobilePinUsed": true,
88 | "nextMobilePinChange": "2017-11-27T06:51:06.099Z"
89 | },
90 | "passInfo": {
91 | "lastPassChange": "2017-07-21T09:25:06.099Z",
92 | "nextPassChange": "2017-08-21T09:25:06.099Z",
93 | "passwordUsed": true
94 | },
95 | "personId": 79683851815,
96 | "pinInfo": {
97 | "pinUsed": true
98 | },
99 | "registrationDate": "2017-01-07T16:51:06.100Z"
100 | },
101 | "contractInfo": {
102 | "blocked": false,
103 | "contractId": 79683851815,
104 | "creationDate": "2017-01-07T16:51:06.100Z",
105 | "features": [
106 | ...
107 | ],
108 | "identificationInfo": [
109 | {
110 | "bankAlias": "QIWI",
111 | "identificationLevel": "SIMPLE",
112 | "passportExpired": false
113 | }
114 | ]
115 | },
116 | "userInfo": {
117 | "defaultPayCurrency": 643,
118 | "defaultPaySource": 7,
119 | "email": null,
120 | "firstTxnId": 10807097143,
121 | "language": "string",
122 | "operator": "Beeline",
123 | "phoneHash": "lgsco87234f0287",
124 | "promoEnabled": null
125 | }
126 | }
127 | ~~~
128 |
129 | Successful JSON-response has the following fields:
130 |
131 | Field|Type|Description
132 | --------|----|----
133 | authInfo|Object|Current authorization settings. The object may be missing, depending on the `authInfoEnabled` parameter in the request.
134 | authInfo.personId|Number|Wallet number
135 | authInfo.registrationDate|String|QIWI Wallet date/registration time (via website/mobile app, or otherwise)
136 | authInfo.boundEmail|String| E-mail linked to your QIWI wallet. If not, `null`
137 | authInfo.ip|String|IP address of the last user session
138 | authInfo.lastLoginDate|String|The date/time of the last session in QIWI Wallet service
139 | authInfo.mobilePinInfo|Object|PIN data of the mobile app
140 | mobilePinInfo.mobilePinUsed|Boolean|Flag of using a PIN-code (actually means that the mobile app is being used)
141 | mobilePinInfo.lastMobilePinChange|String|The date/time of the last time of the PIN change in the mobile app
142 | mobilePinInfo.nextMobilePinChange|String|The date/time of the next (planned) change of the PIN in the mobile app
143 | authInfo.passInfo|Object|Password usage data on the qiwi.com site
144 | passInfo.passwordUsed|Boolean|Flag of using password (actually means using the site qiwi.com)
145 | passInfo.lastPassChange|String|The date/time of the last password change on qiwi.com
146 | passInfo.nextPassChange|String|The date/time of the next (planned) password change on qiwi.com
147 | authInfo.pinInfo|Object|PIN usage data to the wallet app on the self-service kiosks
148 | pinInfo.pinUsed|Boolean|Flag of using a PIN for the terminal (actually means using the wallet app on the self-service kiosk)
149 | contractInfo|Object| Information about the wallet. The object may be missing, depending on the `contractInfoEnabled` parameter in the request.
150 | contractInfo.blocked|Boolean|Flag of wallet block
151 | contractInfo.contractId|Number|Wallet number
152 | contractInfo.creationDate|String|The date/time to create a wallet (via website/mobile app, either at first topup or otherwise)
153 | contractInfo.features|Array[Object]|Service info
154 | contractInfo.identificationInfo|Array[Object]|User's [identification data](https://qiwi.com/settings/identification)
155 | identificationInfo[].bankAlias|String|String's acronym of the system, in which the user has received the identification:: `QIWI` - QIWI Wallet.
156 | identificationInfo[].identificationLevel|String|Current level of the wallet identification. Possible values: `ANONYMOUS` - no identification; `SIMPLE`, `VERIFIED` - simplified identification; `FULL` - full identification.
157 | identificationInfo[].passportExpired|Boolean|Validity of passport data of the wallet' owner (`true` means that the passport data is invalid).
158 | userInfo|Object|Other user data. The object may be missing, depending on the `userInfoEnabled` parameter in the request.
159 | userInfo.defaultPayCurrency|Number(3)|Default wallet balance currency code (ISO-4217)
160 | userInfo.defaultPaySource|Number|Service info
161 | userInfo.email|String|User's e-mail
162 | userInfo.firstTxnId|Number|Identifier of the first transaction after registration
163 | userInfo.language|String|Service info
164 | userInfo.operator|String|Name of the mobile operator of the user's number
165 | userInfo.phoneHash|String|Service info
166 | userInfo.promoEnabled|String|Service info
167 |
168 | # Identification API {#identification}
169 |
170 | Use methods of this API to identify and check identification status of your wallet in QIWI Wallet service. You need identification to get access to increased limits for balances and transactions.
171 |
172 | [Identification details (in Russian)](https://qiwi.com/settings/identification#ru)
173 |
174 | ## User identification {#ident}
175 |
176 | This request allows you to start the identification of your QIWI Wallet.
177 |
178 |
179 |
180 | To obtain Main wallet status, you must provide the following data about the owner of the wallet:
181 |
182 | * The name
183 | * Series / Passport No.
184 | * Date of birth
185 | * TIN, SNILS or OMS policy number is optional.
186 |
187 | To identify your wallet, you must send your name, series/passport number and date of birth. If the data has been verified, the answer will show your TIN and simplified wallet identification will be established. If the data has not been verified, the wallet remains in the status of "No Identification."
188 |
189 |
369 |
370 | ~~~http
371 | HTTP/1.1 200 OK
372 | Content-Type: application/json
373 |
374 | {
375 | "birthDate": "1996-03-18",
376 | "firstName": "Иван",
377 | "id": 79111234567,
378 | "inn": "77***01",
379 | "lastName": "Иванов",
380 | "middleName": "Иванович",
381 | "oms": "",
382 | "passport": "43***11",
383 | "snils": "",
384 | "type": "VERIFIED"
385 | }
386 | ~~~
387 |
388 | Successful JSON response contains masked data used for the wallet identification:
389 |
390 | Response field|Type|Description
391 | --------|----|----
392 | id| Number | User's QIWI wallet number
393 | type | String | Current identification level of the wallet: `SIMPLE` - no identification, status "MINIMAL". `VERIFIED` - status "MAIN" (identification data has been successfully verified). `FULL` – "FULL" status, the wallet already got full identification by the provided name, passport and date of birth.
394 | birthDate |String | Date of birth
395 | firstName|String| User's first name
396 | middleName|String| User's surname
397 | lastName|String| User's last name
398 | passport|String| Series / Passport No. (first and last two digits)
399 | inn|String| User's TIN (first and last two digits)
400 | snils|String| User's SNILS (first and last two digits)
401 | oms|String| User's medical insurance number (OMS) (first and last two digits)
402 |
403 | # QIWI Wallet Limits API {#limits}
404 |
405 | ## Limit levels {#limit-levels}
406 |
407 | By using this API, you can get current limits for operations in your QIWI wallet. Limits apply on accessible amount of the operations.
408 |
409 |
461 |
462 | Name|Type|Description
463 | --------|----|----
464 | types|Array[String]| A list of the types of operations that limits are requested for. Each type is numbered by an array element, starting from zero (`types[0]`, `types[1]`, etc.). Acceptable types of transactions: `REFILL` - balance in the account `TURNOVER` - turnover per month `PAYMENTS_P2P` - transfers to other wallets per month `PAYMENTS_PROVIDER_INTERNATIONALS` - payments to foreign companies per month `PAYMENTS_PROVIDER_PAYOUT` - transfers to bank accounts and cards, wallets of other systems `WITHDRAW_CASH` - cash withdrawals per month. At least one type of operation must be specified.
465 |
466 |
Response ←
467 |
468 | ~~~http
469 | HTTP/1.1 200 OK
470 | Content-Type: application/json
471 |
472 | {
473 | "limits":{
474 | "RU" :[
475 | {
476 | "type": "TURNOVER",
477 | "currency": "RUB",
478 | "rest": 200.00,
479 | "max": 40000.00,
480 | "spent": 39800.00,
481 | "interval": {
482 | "dateFrom": "2019-11-01T:00:00",
483 | "dateTill": "2019-12-01T00:00"
484 | }
485 | },
486 | ...
487 | ]
488 | }
489 | }
490 | ~~~
491 |
492 | ~~~python
493 | # wallet number like 79992223344
494 | mylogin = '79999999999'
495 | api_access_token = '975efd8e8376xxxb95fa7cb213xxx04'
496 |
497 | # list of all limits
498 | limits = limits(mylogin,api_access_token)['limits']['RU']
499 |
500 | # turnover limit
501 | turnoverInfo = [x for x in limits if x['type'] == 'TURNOVER']
502 | turnoverLimit = turnoverInfo[0]['rest']
503 | ~~~
504 |
505 | Successful JSON response contains an array of limits for your QIWI wallet operations:
506 |
507 | Response field|Type|Description
508 | --------|----|----
509 | limits|Object| Limits data
510 | limits[].'RU'|Array[Object]| An array of limits for operations
511 | type | String | Operation type where the limit is applied
512 | currency | String | Currency of the operation
513 | max | String | Value of the limit
514 | spent|String| Amount already spent in the operations
515 | rest|Boolean| The rest of the limit which can be used in the given period (see `interval` field)
516 | interval|Object| Details of the limit's period
517 | interval.dateFrom, interval.dateTill| String| Period's start and end, as `YYYY-MM-DDTHH:MM:SStmz` string
518 |
519 | ## Person-to-person transaction limit {#p2p-limit}
520 |
521 | The API returns the value of the person-to-person transaction number for the current month.
522 |
523 |
Данные параметры передаются в JSON-теле запроса:
455 |
456 |
457 |
458 |
459 | Название|Тип|Описание
460 | --------|----|----
461 | identificationLevel|String| Уровень, до которого требуется понизить идентификацию (на данный момент понижение возможно только до статуса "Основной" - `VERIFIED`)
462 |
463 |
Ответ ←
464 |
465 | ~~~http
466 | HTTP/1.1 200 OK
467 | Content-Type: application/json
468 |
469 | {
470 | "downgradeOperationId": "1747ea28-1082-41bc-bde4-72994b3ffeb4"
471 | }
472 | ~~~
473 |
474 | Успешный ответ в формате JSON содержит ID заявки на понижение уровня идентификации:
475 |
476 | Поле ответа | Тип |Описание
477 | --------|--------|----
478 | downgradeOperationId| String |ID заявки на понижение уровня идентификации
479 |
480 | ### Подтверждение заявки на понижение уровня идентификации {#confirm-downgrade}
481 |
482 |
Данные параметры передаются в строке запроса:
659 |
660 |
661 |
662 |
663 | Название|Тип|Описание
664 | --------|----|----
665 | types|Array[String]|Список типов операций, по которым запрашиваются лимиты. Каждый тип нумеруется элементом массива, начиная с нуля (`types[0]`, `types[1]` и т.д.). Допустимые типы операций: `REFILL` - максимальный допустимый остаток на счёте `TURNOVER` - оборот в месяц `PAYMENTS_P2P` - переводы на другие кошельки в месяц `PAYMENTS_PROVIDER_INTERNATIONALS` - платежи в адрес иностранных компаний в месяц `PAYMENTS_PROVIDER_PAYOUT` - Переводы на банковские счета и карты, кошельки других систем `WITHDRAW_CASH` - снятие наличных в месяц. Должен быть указан хотя бы один тип операций.
666 |
667 |
Ответ ←
668 |
669 | ~~~http
670 | HTTP/1.1 200 OK
671 | Content-Type: application/json
672 |
673 | {
674 | "limits":{
675 | "RU" :[
676 | {
677 | "type": "TURNOVER",
678 | "currency": "RUB",
679 | "rest": 200.00,
680 | "max": 40000.00,
681 | "spent": 39800.00,
682 | "interval": {
683 | "dateFrom": "2019-11-01T:00:00",
684 | "dateTill": "2019-12-01T00:00"
685 | }
686 | },
687 | ...
688 | ]
689 | }
690 | }
691 | ~~~
692 |
693 | ~~~python
694 | # номер кошелька в формате 79992223344
695 | mylogin = '79999999999'
696 | api_access_token = '975efd8e8376xxxb95fa7cb213xxx04'
697 |
698 | # все лимиты (список)
699 | limits = limits(mylogin,api_access_token)['limits']['RU']
700 |
701 | # лимит оборота
702 | turnoverInfo = [x for x in limits if x['type'] == 'TURNOVER']
703 | turnoverLimit = turnoverInfo[0]['rest']
704 | ~~~
705 |
706 | Успешный ответ содержит JSON-массив лимитов по операциям вашего QIWI Кошелька:
707 |
708 | Поле ответа |Тип|Описание
709 | --------|----|----
710 | limits|Object|Описание лимитов
711 | limits[].'RU'|Array[Object]| Массив лимитов на операции
712 | type | String |Тип операций, на которые действует этот лимит
713 | currency | String |Валюта операций
714 | max | String |Значение лимита
715 | spent|String|Сумма, потраченная по данным операциям
716 | rest|Boolean|Остаток лимита, который можно потратить в указанный период (период задается в параметре `interval`)
717 | interval|Object|Сведения о периоде действия лимита
718 | interval.dateFrom, interval.dateTill| String| Начало и конец периода, формат даты `ГГГГ-ММ-ДДТЧЧ:ММ:ССtmz`
719 |
720 | ## Лимит по операциям с физлицами {#p2p-limit}
721 |
722 | Запрос возвращает значение количества операций с физлицами за текущий месяц в вашем QIWI кошельке.
723 |
724 |
Send parameters in the request query. All parameters are required.
298 |
299 |
300 |
301 | Name|Type|Description
302 | ----|-----|------
303 | hookType|Integer|Webhook type. Only `1`.
304 | param|URL-encoded| Service URL. URL original length (before URL-encoding) must be within 100 symbols. **URL must be accessible from the Internet**.
305 | txnType|String| Choose type of transactions for notifications: 0 - only incoming transactions (wallet top-up); 1 - only outgoing transactions (payments); 2 - all transactions
306 |
307 |
Параметры передаются в query запроса. Все параметры обязательны.
303 |
304 |
305 |
306 | Название|Тип|Описание
307 | ----|-----|------
308 | hookType|Integer|Тип хука. Только 1 - вебхук.
309 | param|URL-encoded|Адрес сервера обработки вебхуков. Длина исходного (не URL-encoded) адреса — не более 100 символов. **URL обработчика должен быть доступен из Интернета**.
310 | txnType|String|Тип транзакций, по которым будут включены уведомления. Возможные значения: 0 - только входящие транзакции (пополнения); 1 - только исходящие транзакции (платежи); 2 - все транзакции
311 |
312 |
479 |
480 | ~~~http
481 | HTTP/1.1 201 Created
482 | Content-Type: application/json
483 |
484 | {
485 | "key":"OikS4/CcIbSf+yYGnLbnOige8RGoYmGxs/LNMwkJy7Q="
486 | }
487 | ~~~
488 |
489 | Формат ответа JSON.
490 |
491 | Название|Тип|Описание
492 | -----|------|------
493 | key|String|Base64-закодированный новый ключ
494 |
495 | ## Данные об обработчике уведомлений {#hook_active}
496 |
497 | Список действующих (активных) обработчиков уведомлений, связанных с вашим кошельком, можно получить данным запросом.
498 |
499 | Так как сейчас используется только один тип хука - вебхук, то в ответе содержится только один объект данных.
500 |
501 |
590 |
591 | ~~~http
592 | HTTP/1.1 200 OK
593 | Content-Type: application/json
594 |
595 | {
596 | "response":"Webhook sent"
597 | }
598 | ~~~
599 |
600 | Формат ответа JSON.
601 |
602 | Название|Тип|Описание
603 | -----|------|------
604 | response|String|Результат запроса
605 |
--------------------------------------------------------------------------------
/qiwi-wallet-personal_en.html.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: QIWI Wallet API
3 |
4 | search: true
5 |
6 | metatitle: QIWI Wallet API
7 |
8 | metadescription: QIWI Wallet API allows you to access your QIWI Wallet account information and make payment operations as well as get payment reports and many more.
9 |
10 | category: apiqiwiwallet
11 |
12 | language_tabs:
13 | - shell: cURL
14 | - php: PHP
15 | - python: Python
16 | - http: Request/Response
17 |
18 | toc_footers:
19 | - Main page
20 | - Feedback
21 | - P2P-operations support
22 | - Interactive API
23 |
24 | includes:
25 | - qiwi-wallet-personal/profile_en
26 | - qiwi-wallet-personal/payment_history_en
27 | - qiwi-wallet-personal/balance_en
28 | - qiwi-wallet-personal/payment_en
29 | - qiwi-wallet-personal/webhook_en
30 | - qiwi-wallet-personal/error_en
31 |
32 | ---
33 |
34 | *[Token]: String for user authentication in API by OAuth 2.0 standard RFC 6749, RFC 6750.
35 | *[token]: String for user authentication in API by OAuth 2.0 standard, see RFC 6749, RFC 6750.
36 |
37 | # General Information
38 |
39 | ###### [Propose corrections on GitHub](https://github.com/QIWI-API/qiwi-wallet-personal-docs/)
40 |
41 | QIWI Wallet API makes it easy to automate getting info on your account's state in [QIWI Wallet service](https://qiwi.com) and making financial operations.
42 |
43 | API uses HTTPS requests and JSON-formatted responses.
44 |
45 | API methods are accessible after the user is registered in [QIWI Wallet service](https://qiwi.com).
46 |
47 | ## Service data {#auth_param}
48 |
49 |
50 |
Authorization
51 |
52 |
53 |
54 | Parameter|Description|Type
55 | ---------|--------|---
56 | token | [Token](#auth_data) to authorize API requests. Token is valid within one month after its [issuing](#auth_data). | String
57 |
58 | # API Access {#api-access}
59 |
60 | We have stopped issuing QIWI OAuth-tokens.
61 |
62 | Main URL address to call API methods (unless explicitly stated):
63 |
64 | `https://edge.qiwi.com`
65 |
66 | To make a successful request of API methods, you need:
67 |
68 | * Correct HTTP headers: `Accept` and `Content-Type`, as designated in a method description.
69 | * URL composed according to the method reference
70 | * OAuth token issued for your QIWI Wallet. Some requests do not require it though.
71 |
72 | # Authorization {#auth_api}
73 |
74 | ## Authorization data {#auth_data}
75 |
76 | We have stopped OAuth token issue.
77 |
78 | QIWI Wallet API implements OAuth 2.0 open authorization protocol specification. A user registers or authenticates on QIWI Wallet site and requests a token with a certain scopes. Token issue is confirmed by SMS code.
79 |
80 |
81 |
82 | ## Authorization example {#auth_ex}
83 |
84 | We have stopped OAuth token issue.
85 |
86 | ~~~shell
87 | curl "server address" \
88 | --header "Authorization: Bearer jMyN22DQxMjM6NDUzRmRnZDQ0Mw11212e"
89 | ~~~
90 |
91 |
94 |
95 | * As a result of authentication in [QIWI Wallet site](https://qiwi.com/api), you [got](#auth_data) the token:
96 |
97 | `U1QtOTkwMTAyLWNud3FpdWhmbzg3M`
98 |
99 | * Add the token to `Authorization: Bearer ` HTTP header.
100 |
101 | * The header has to be added to each API request:
102 |
103 | `Authorization: Bearer U1QtOTkwMTAyLWNud3FpdWhmbzg3M`
104 |
--------------------------------------------------------------------------------
/qiwi-wallet-personal_ru.html.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: API QIWI Кошелька
3 |
4 | search: true
5 |
6 | metatitle: API QIWI Кошелька
7 |
8 | metadescription: API QIWI Кошелька позволяет автоматизировать выполнение платежей и получение отчетов о платежах, информации о счёте, идентификации.
9 |
10 | category: apiqiwiwallet
11 |
12 | language_tabs:
13 | - http: Запрос/ответ
14 | - shell: cURL
15 | - php: PHP
16 | - python: Python
17 |
18 | toc_footers:
19 | - Список изменений
20 | - На главную
21 | - Обратная связь
22 | - Помощь по P2P-операциям
23 | - Попробовать API
24 |
25 | includes:
26 | - qiwi-wallet-personal/profile_ru
27 | - qiwi-wallet-personal/payment_history_ru
28 | - qiwi-wallet-personal/balance_ru
29 | - qiwi-wallet-personal/master_ru
30 | - qiwi-wallet-personal/payment_ru
31 | - qiwi-wallet-personal/webhook_ru
32 | - qiwi-wallet-personal/error_ru
33 |
34 | ---
35 |
36 | *[Токен]: Символьная строка для аутентификации пользователя в API по стандарту OAuth 2.0 RFC 6749, RFC 6750.
37 | *[токен]: Символьная строка для аутентификации пользователя в API по стандарту OAuth 2.0 RFC 6749, RFC 6750.
38 | *[API]: Application Programming Interface - набор готовых методов, предоставляемых приложением (системой) для использования во внешних программных продуктах.
39 | *[JSON]: JavaScript Object Notation - текстовый формат обмена данными, основанный на *JavaScript*.
40 |
41 | # Общие сведения {#intro}
42 |
43 | ###### [Эта страница на GitHub](https://github.com/QIWI-API/qiwi-wallet-personal-docs)
44 |
45 | API QIWI Кошелька позволяет автоматизировать получение информации о вашем счёте в [сервисе QIWI Кошелек](https://qiwi.com) и проводить операции с его помощью.
46 |
47 | Методы API доступны после регистрации пользователя в [сервисе QIWI Кошелек](https://qiwi.com).
48 |
49 | ## Авторизация запросов {#auth_param}
50 |
51 |
52 |
Авторизация
53 |
54 |
55 |
56 | Параметр|Описание|Тип
57 | ---------|--------|---
58 | Bearer token | Токен для доступа к вашему QIWI кошельку по API. Действие токена заканчивается через 180 дней после [выпуска](#auth_data). Одновременно может действовать только один токен. | String
59 |
60 | # Доступ к API {#auth_api}
61 |
62 | Основной URL-адрес для вызова методов API (если не указано иное):
63 |
64 | `https://edge.qiwi.com`
65 |
66 | Для успешного вызова методов API необходимы:
67 |
68 | * Корректные значения HTTP-заголовков `Accept` и `Content-Type` в запросе. API QIWI Кошелька поддерживает только один MIME-тип: `application/json`. Любое другое значение приведет к [ошибке формата данных](#errors).
69 | * URL, составленный согласно требованиям к нужному запросу.
70 | * OAuth-токен, выданный вам для доступа к вашему QIWI кошельку. Для некоторых запросов его не потребуется.
71 |
72 | ## Получение OAuth-токена {#auth_data}
73 |
74 | Мы остановили выпуск OAuth-токенов. Приносим извинения за доставленные неудобства.
75 |
76 | API QIWI Кошелька использует открытый протокол [OAuth 2.0](http://tools.ietf.org/html/rfc6749). Согласно протоколу, пользователь авторизуется или регистрируется на сайте и запрашивает токен OAuth 2.0 Bearer с правом выполнения определённых действий. Выпуск токена подтверждается одноразовым кодом из СМС.
77 |
78 |
79 |
80 | 
81 |
82 | ## Пример вызова API {#auth_ex}
83 |
84 | ~~~shell
85 | curl "адрес сервера" \
86 | --header "Accept: application/json" \
87 | --header "Content-Type: application/json" \
88 | --header "Authorization: Bearer <токен API QIWI Кошелька>"
89 | ~~~
90 |
91 | Мы остановили выпуск OAuth-токенов. Приносим извинения за доставленные неудобства.
92 |
93 | Передавайте полученный токен в HTTP-заголовке `Authorization` при каждом вызове API, указывая тип токена `Bearer` перед его значением. Пример получения такого заголовка:
94 |
95 | * В результате авторизации на сайте QIWI Кошелек и выпуска токена [получен](#auth_data) токен, представляющий собой строку:
96 |
97 | `U1QtOTkwMTAyLWNud3FpdWhmbzg3M`
98 |
99 | * Токен добавляется в заголовок `Authorization: Bearer `
100 |
101 | * Итоговый заголовок, добавляемый в каждый запрос к API QIWI Кошелька:
102 |
103 | `Authorization: Bearer U1QtOTkwMTAyLWNud3FpdWhmbzg3M`
104 |
--------------------------------------------------------------------------------