Create transaction (prepaid)
POST/accounting/transactions/prepaid
accounting.transactions.create_no_negative
The method creates a transaction only if the client balance (including
the credit limit) will not become negative afterwards. Otherwise
LowBalanceError exception is raised. If client has unlimited credit,
the transaction is created as usual.
Taxes can be set in one of two ways:
-
Using
taxes_state- Set
taxes_statetoincludedto subtract taxes from the specifiedamountaccording to the tax profile of the client. - Set
taxes_statetoexcludedto calculate taxes in addition to the specifiedamount.
- Set
-
Providing an exact list of taxes - Pass a list of
taxes, where each item is a two-element array: - The first element is an integer representing the taxid. - The second element is a decimal value representing the tax amount.
If you need to create a transaction regardless of the client balance, use "Create transaction (postpaid)" instead.
Request
Responses
- 200
- 400
- 401
- 404
- 422
- 500
Transaction details as stored.
The request contains invalid arguments or is malformed
Access is not authorized
Requested object was not found
A logical error occurred, making the request unprocessable
An unexpected error occurred