Difference between revisions of "MOR API user balance get"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: | Line 1: | ||
<!---This functionality is available from MOR 10, but was also backported to MOR 9---> | |||
=About= | =About= | ||
This feature enables you to check the balance over http. | This feature enables you to check the balance over http. | ||
<br><br> | |||
==Enable check balance over http feature== | ==Enable check balance over http feature== | ||
Line 21: | Line 20: | ||
HTML POST: http://<SERVER_IP>/billing/api/balance?username=USERNAME¤cy={USER|CURRENCY_CODE} | HTML POST: http://<SERVER_IP>/billing/api/balance?username=USERNAME¤cy={USER|CURRENCY_CODE} | ||
<br><br> | |||
==Result== | ==Result== | ||
Line 27: | Line 26: | ||
returns balance of user. | returns balance of user. | ||
<br><br> | |||
==Erros== | ==Erros== | ||
Line 35: | Line 34: | ||
When feature is off. | When feature is off. | ||
Feature disabled | Feature disabled | ||
<br><br> | |||
=See Also= | |||
* [[MOR API]] | * [[MOR API]] |
Revision as of 13:11, 1 March 2013
About
This feature enables you to check the balance over http.
Enable check balance over http feature
1. Go to SETTINGS - Setup -> Settings
2. In Various tab check the marked option (in MOR 12 this option was moved to API tab):
Request
HTML POST: http://<SERVER_IP>/billing/api/balance?username=USERNAME
Optionaly you can specify currency, valid values are USER, in that case balance is returned in user's currency. And currency code(EUR, USD etc.)
HTML POST: http://<SERVER_IP>/billing/api/balance?username=USERNAME¤cy={USER|CURRENCY_CODE}
Result
-349282.18
returns balance of user.
Erros
When user is not found.
User not found
When feature is off.
Feature disabled