1b.app
Link copied -

API Payment (Payment)

Add payment, method: /api/payment/add/

Parameters

Example:

http://myboxurl/api/payment/add/?login=LOGIN&password=PASSWORD&sum=322¤cyname=UAH&accountid=1&clientid=1&clientemail=test@test.ru&clientname=Vasya Pupkin&orderid=2&comment=Test Payment
http://myboxurl/api/payment/add/?login=LOGIN&password=PASSWORD&sum=233¤cyname=UAH&accountid=1&clientemail=test@test.ru&ordercode1c=777

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 cdate datetime Payment creation date Optional field. If not specified, the current date will be set
4 pdate datetime Posting date (when the payment became active) Optional field.  
5 rdate datetime Payment canceled date Optional field.  
6 sum float Payment amount Required field. Must not equal 0
7 sumbase float Payment amount in base currency Optional field. This is the amount in the base currency of the OneBox system (if not specified by the system, fill it in automatically based on the payment amount
8 currencyid integer ID payment currency Optional field.  
9 currencyname string Payment currency name Optional field.  
10 currencyrate float The rate of the payment currency relative to the base currency of the system Optional field.  
11 accountid integer ID Accounts to which payments should be made in the system Optional field.  
12 accountname string Name of the account to which the payment is made in the system Optional field.  
13 accountcode1c string External ID of the account to which the payment is made in the system Optional field.  
14 clientid integer id the client to whom to create a payment Optional field. If you specify then the system will try to find the client by id and link the payment to him
15 clientcode1c string code1c the client to whom to create a payment Optional field. If you specify then the system will try to find the client by code1c and link the payment to him
16 clientemail string Email the client to whom to create a payment Optional field. If you specify then the system will try to find a client by email and link a payment to him
17 clientphone string Customer's phone number to create a payment on Optional field. If you specify, the system will try to find a customer by phone and link a payment to him
18 codepayment string Payment code Optional field.  
19 clientname string The name of the client to whom to create a payment Optional field.  
20 managerid integer id the user who will make the payment Optional field. If you do not specify, then the user from whom the payment will be created will be taken
21 categoryid interger Id payment categories Optional field.  
22 categoryname string Payment category name Optional field.  
23 orderid integer Id order to which to link the payment Optional field. If you specify then the system will try to find an order by id and link payment to it
24 ordercode1c integer code1c order to which to link the payment Optional field. If you specify then the system will try to find the order by code1c and link the payment to it
25 linkkey string Unique payment key Optional field.  
26 comment string Payment comment Optional field.  
27 invoiceid integer ID cpayment couple Optional field.  
28 nobalance 1 / 0 Whether to include this payment in the overall balance Optional field.  
29 code1c string Code1c payment (payment id from your system) Optional field.  
30 direction enum('fromclient','toclient') Direction of payment (defaults to the amount of payment) Optional field.  

Add pending payment, method: /api/payment/probation/add/

Parameters

Example:

http://myboxurl/api/payment/probation/add/?login=LOGIN&password=PASSWORD&sum=322¤cyname=UAH&accountid=1&orderid=2&comment=Test Payment
http://myboxurl/api/payment/probation/add/?login=LOGIN&password=PASSWORD&sum=233¤cyname=UAH&accountid=1&ordercode1c=777&received=1

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 pdate date Date of expected receipt of payment Required field.  
4 sum float Payment amount Required field. Must not equal 0
5 currencyid integer ID payment currency Optional field.  
6 currencyname string Payment currency name Optional field.  
7 accountid integer ID Accounts to which payments should be made in the system Optional field.  
8 accountname string Name of the account to which the payment is made in the system Optional field.  
9 managerid integer id the user who will make the payment Optional field. If you do not specify, then the user from whom the payment will be created will be taken
10 categoryid interger Id payment categories Optional field.  
11 categoryname string Payment category name Optional field.  
12 orderid integer Id order to which to link the payment Optional field. Or the order id or code1c is required to create the expected payment
13 ordercode1c string code1c order to which to link the payment Optional field. Or the order id or code1c is required to create the expected payment
14 comment string Payment comment Optional field.  
15 received 1 / 0 Received payment Optional field.  

Delete payment, method: /api/payment/delete/

Parameters

Example:

http://myboxurl/api/payment/delete/?login=LOGIN&password=PASSWORD&paymentid=3

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 paymentid string Id payment Required field. Or payment id or code1c is required to delete
4 paymentcode1c string Code1c payment Required field. Or payment id or code1c is required to delete

Remove pending payment, method: /api/payment/probation/delete/

Parameters

Example:

http://myboxurl/api/payment/probation/delete/?login=LOGIN&password=PASSWORD&paymentid=3

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 paymentid integer Id payment Required field. id pending payment is required to delete
4 nomessage 1 / 0 Не создавать уведомление об удалении Optional field.

Editing payment, method: /api/payment/update/

Parameters

Example:

http://myboxurl/api/payment/update/?login=LOGIN&password=PASSWORD&paymentid=2&orderid=660&&comment=Change payment&sum=3333

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 paymentid string Id payment Required field. Or payment id or code1c is required to edit
4 paymentcode1c string Code1c payment Required field. Or payment id or code1c is required to edit
5 cdate datetime Payment creation date Optional field.  
6 pdate datetime Date of payment Optional field.  
7 rdate datetime Payment refused date Optional field.  
8 sum float Payment amount Optional field.  
9 sumbase float Payment amount in base currency Optional field.  
10 currencyid integer ID payment currency Optional field.  
11 currencyname string Payment currency name Optional field.  
12 accountid integer ID Accounts to which payments should be made in the system Optional field.  
13 accountname string Name of the account to which the payment is made in the system Optional field.  
14 clientid integer id client Optional field. If you specify then the system will try to find the client by id and link the payment to him
15 clientcode1c string code1c client Optional field. If you specify then the system will try to find the client by code1c and link the payment to him
16 orderid integer Id order to which to link the payment Optional field.  
17 ordercode1c string Code1c order to which to link payment Optional field.  
18 comment string Payment comment Optional field.  

Receive one expected payment and receive all expected payments, method: /api/payment/probation/get/

Parameters
Parameters for receiving one pending payment:

Example:

http://myboxurl/api/payment/probation/get/?login=LOGIN&password=PASSWORD&paymentid=7927

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 paymentid integer id expected payment Required field. If you need a specific expected payment, then in this field you pass the id of the expected payment that our API returned to you when it was created.
Return field values
id - id payment
cdate - creation date,
amount - payment amount,
amountbase - payment amount in the base currency of the system,
orderid - id payment order,
ordercode1c - external code of the payment process,
ordername - name of the payment process,
currencyid - id payment currency,
currencyname - payment currency name,
accountid - id payment account,
accountname - payment account name,
categoryid - id payment categories,
categoryname - payment category name,
direction - direction of payment,
received - Has the payment been received,
managerid - id the employee who created the payment,
managerName - name of who created the payment,


Parameters for receiving all expected payments:

Example:

http://myboxurl/api/payment/probation/get/?login=LOGIN&password=PASSWORD&part=1 http://myboxurl/api/payment/probation/get/?login=LOGIN&password=PASSWORD&part=2

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 cdatefrom date Payment creation date from Optional field.  
4 cdateto date Payment creation date to Optional field.  
5 pdatefrom date Payment received date from Optional field.  
6 pdateto date Payment received date to Optional field.  
7 accountid integer id pending payment account Optional field.  
8 accountname string Account name of the expected payment Optional field.  
9 categoryid integer id payment categories Optional field.  
10 categoryname string Payment category name Optional field.  
11 orderid integer id payment process Optional field.  
12 ordercode1c string External code of the payment process Optional field.  
13 received 1 / 0 Received payment Optional field. 1 - payments received only
0 - only not received payments
10 part integer Part of orders Required field. API gives up to 1000 expected payments in the 1st part, to get the next 1000 orders send 2 there (part 2 is obtained) and so on.

Return field values
id - id payment
cdate - creation date,
amount - payment amount,
amountbase - payment amount in the base currency of the system,
orderid - id payment order,
ordercode1c - external code of the payment process,
ordername - name of the payment process,
currencyid - id payment currency,
currencyname - payment currency name,
accountid - id payment account,
accountname - payment account name,
categoryid - id payment categories,
categoryname - payment category name,
direction - direction of payment,
received - Has the payment been received,
managerid - id the employee who created the payment,
managerName - name of who created the payment,

Receive one actual payment and receive all actual payments, method: /api/payment/get/

Parameters
Parameters for receiving one payment:

Example:

http://myboxurl/api/payment/get/?login=LOGIN&password=PASSWORD&paymentid=7927

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 paymentid integer id payment Required field. If you need a specific payment, then in this field you pass the payment id that our API returned to you when it was created.
Return field values
id - id payment
code1c - code1c payment
cdate - Created date
amount- Amount
currencyid - payment currency
currencyname - payment currency name
currencyrate - course
amountbase - payment in base currency
accountid - id payment account
accountname - account name
categoryid - id payment categories
categoryname - category name
virtual - whether the virtual payment is a payment
direction - direction of payment
clientid - id client
clientName - customer name
clientCode1c - code1c client
userid - id who made the payment
userName - name of the provider
userCode1c - code1c who made it
documentid - id document related to payment
comment - Comment
referenscode - reference code
bankdetail - bank details
customfields - additional order product fields that consist of:
  • key - additional_field_key_
  • name - custom field name
  • value - additional field value


Parameters for receiving all payments:

Example:

http://myboxurl/api/payment/get/?login=LOGIN&password=PASSWORD&part=1
http://myboxurl/api/payment/get/?login=LOGIN&password=PASSWORD&part=2

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 cdatefrom date Payment creation date from Optional field.  
4 cdateto date Payment creation date to Optional field.  
5 pdatefrom date Payment received date from Optional field.  
6 pdateto date Payment received date to Optional field.  
7 accountid integer id payment account Optional field.  
8 accountname string Payment account name Optional field.  
9 categoryid integer id payment categories Optional field.  
10 categoryname string Payment category name Optional field.  
11 orderid integer id payment process Optional field.  
12 ordercode1c string External code of the payment process Optional field.  
13 part integer Payment part Required field. API gives up to 1000 payments in the 1st part, to get the next 1000 orders send 2 there (part 2 is obtained) and so on.

Return field values
id - id payment
code1c - code1c payment
cdate - Created date
amount- Amount
currencyid - payment currency
currencyname - payment currency name
currencyrate - course
amountbase - payment in base currency
accountid - id payment account
accountname - account name
categoryid - id payment categories
categoryname - category name
virtual - whether the virtual payment is a payment
direction - direction of payment
clientid - id client
clientName - customer name
clientCode1c - code1c client
userid - id who made the payment
userName - name of the provider
userCode1c - code1c who made it
documentid - id document related to payment
comment - Comment
referenscode - reference code
bankdetail - bank details
customfields - additional order product fields that consist of:
  • key - additional_field_key_
  • name - custom field name
  • value - additional field value

Get the balances of all financial accounts, method: /api/payment/balance/get/

Parameters

Example:

http://myboxurl/api/payment/balance/get/?login=LOGIN&password=PASSWORD

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
3 contractortype string Тип юридического лица Не обязательное поле. Допустимые значения:
  • all - виртуальные и не виртуальные юридические лица
  • standard или параметр contractortype не передан - только не виртуальные
  • virtual - виртуальные
4 accountid integer id счета Не обязательное поле. Если нужно получить баланс только по 1 счету, необходимо указать этот параметр
         

Return field values
id - id financial account,
name - financial account name,
active - activity status,
contractorid - id legal entity,
currencyid - ID account currency,
currencyname - account currency name,
overdraft - overdraft amount,
balancestart - starting balance,
managerid - ID account manager,
balance - financial account balance,
balanceIn - the amount of incoming payments for the account,
balanceOut - the amount of outgoing payments for the account,
balancedate - date and time when the balance was received

Get all budgets balances, method: /api/budget/balance/get/

Parameters

Example:

http://myboxurl/api/budget/balance/get/?login=LOGIN&password=PASSWORD

Field Type Description Required or not Comment
1 login string Login in BOX system Required field.  
2 password string Password in md5 format Required field. Contact tech support and we will give you a hash for the API
         

Return field values
id - id budget,
name - budget name,
active - activity status,
currencyid - ID budget currencies,
currencyname - name of the budget currency,
stabilizationfund - amount of the stabilization fund in base currency,
sumamount - amount of transactions in budget currency,
sumamountbase - amount of transactions in base currency,
balance - budget balance in budget currency,
balancebase - base currency budget balance,
balancedate - date and time when the balance was received

Possible responses to the request

More details
Status Message Message Description
1 ok paymentid id added / edited payment
2 fail login_empty Login missing
3 fail password_empty Missing password
4 fail Login or password not correct! Invalid username or password
5 fail Bad user level! Low user level to perform this action (requires level 2 or higher)
6 fail PaymentCode1c exists A payment with this code already exists
7 fail FinanceAccount not found No financial account found
8 fail Payment by id or code1c not found A payment with this id or code already exists
9 fail Payment accounts not found No financial accounts found

Errors may also occur:

502 Bad Gateway - If this error occurs it is necessary:
1. Check if you have internet access (go to any other site).
2. If there are no problems with access — cookies can be deleted.
If the above doesn't work — server side problem. Please contact your site system administrator.

503 (Service Temporarily Unavailable) - this error may occur as a result of too many server requests. If you see this error, you should wait a couple of minutes and try again.

504 Gateway Timeout - cmost likely the reason is the increased load on the site, in which Apache is not has time to send HTTP responses and new requests are queued. You can add resources to the server, in particular RAM, and increase the number of httpd (Apache) processes.
Another possible reason for error 504 is that the executable script does not fit within the allotted limit time. This happens when the request is too heavy. Try to split your request into a few more small.

Error 505 HTTP Version not supported means the website is not Supports the version of the HTTP protocol that the browser uses to request a web page