- Payler

advertisement
balance
api/mfo/balance
Получение баланса связанных с проектом аккаунтов
Аргументы
pidhashid проекта
Ответ
{"error": false, "data": [{amount: баланс, aid: ид-аккаунта, name: название, type: имяшлюза}]}
create
api/mfo/create
Создание списка транзакций
Аргументы
pidhashid проекта
[name]stringназвание списка
Ответ
{"error": false, "data": "transaction-list-id (lid)"}
Ошибки
Имя задано, но не строка или длина привышает 128 символов
{"error": true, "data": "Incorrect name"}
info
api/mfo/info
Получение комиссий
Аргументы
pidproject-idrequired if lid is not specified
aidfrom-account-idcan be not specified, but only if there is a single account in project
[type=card]texttype of recipient (default value is - card).
[to]textaccount identifier (credit card number)
[currency]numbercode of currency. default is account currency
amountnumberamount of money to transfer. in minimal currency (копейки)
Ответ
{"error": false, "data": {full: full_price, fix: fixed_commission, percent: percent_commission
(0.00-100.00), min: smallest_available_transaction, max: max_available_transaction}}
Ошибки
Неподдерживаемый тип транзакции (проверьте type)
{"error": true, "data": "Unsupported transaction type: переданное_название_типа"}
указан не существующий aid
{"error": true, "data": "no such account"}
proceed
api/mfo/proceed
Proceed transaction or list of transactions
Аргументы
[tid]transaction-idid of transaction. optional if lid is specified
[lid]transaction-list-idid of transaction list. optional if tid is specified. If both are specified only single transaction with tid would be proceeded
Ответ
{"error": false, "data": {tid: transactionId, status: status}}
status
api/mfo/status
Получение статуса транзакции
tid: transaction-id - id of transaction. optional if lid is specified
Ответ
{"error": false, "data": {tid: tid, status: status, text: text}}
Ошибки
указан не существующий tid
{"error": true, "data": "no transaction"}
transaction
api/mfo/transaction
Create transaction
Аргументы
[pid]project-idrequired if lid is not specified
[lid]transaction-list-idrequired if pid is not specified
[text]textoptional comment
[aid]from-account-idcan be not specified, but only if there is a single account in project
[type=card]texttype of recipient (default value is - card).
totextaccount identifier (credit card number)
[currency]numbercode of currency (rub is 643). Required if aid is not specified or if
there are more than one aid in project and aid is not specified but you know that account
with exact currency is only one (strange case)
amountnumberamount of money to transfer. in minimal currency (копейки)
[info=false]booleando not create transaction, get prices
Ответ
{"error": false, "data": "transaction-id"}
For info=true look at method mfo.info, it works same way, but can predict account and other
things that transaction method do
Ошибки
Неподдерживаемый тип транзакции (проверьте type)
{"error": true, "data": "Unsupported transaction type: переданное_название_типа"}
Поле text задано, но в нём не текст
{"error": true, "data": "text arg should be string or undefined"}
Amount должен быть больше нуля
{"error": true, "data": "Amount should be positive"}
Платежный аккаунт не из этого проекта (проверьте aid)
{"error": true, "data": "No accounts in project `project-id`"}
Aid не задан и в проекта имеется более чем один аккаунт
{"error": true, "data": "There are more than one account with such currency. Please specify
aid"}
Задано поле currency, но не задан aid. При этом в проекте более одного аккаунта с
такой валютой и мы не будем угадывать нужный.
{"error": true, "data": "There are more than one account with such currency. Please specify
aid or currency"}
указан не существующий aid
{"error": true, "data": "no such account"}
указан aid не принадлежащий проекту
{"error": true, "data": "Account does not belongs to project `ид_проекта`"}
Download