Manage low balance settings
Это содержимое пока не доступно на вашем языке.
These methods read and change the low balance settings of an account or a customer: the threshold, the e-mail warning and the automatic charge of a stored card. They are the settings of Auto Recharge / Notifications in the panel. Both methods take either i_account or i_customer.
Low balance structure
Section titled “Low balance structure”| Name | Type | Description |
|---|---|---|
threshold |
double | Threshold: the balance below which the settings apply. None means disabled |
notify_by_email |
boolean | Notify by E-Mail: send a warning e-mail when the balance falls below the threshold |
charge_card |
boolean | Charge Card: charge a stored card automatically when the balance falls below the threshold |
charge_amount |
double | Charge Amount: amount of the automatic charge, in the payer’s currency |
i_debit_credit_card |
int | Use Card: the stored card to charge. None means the primary card |
br_charge_card |
boolean | Accounts only. Charge a stored card automatically on the billing run (Billing Run in the panel) |
br_charge_amount |
double | Accounts only. Amount charged on the billing run. None means the Plan Price of the service plan |
br_i_debit_credit_card |
int | Accounts only. The stored card to charge on the billing run. None means the primary card |
getLowBalance
Section titled “getLowBalance”Returns the low balance settings.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_account |
int | one of | ID of the account |
i_customer |
int | one of | ID of the customer |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
| … | The fields of the low balance structure. The br_ fields are returned for accounts only |
Example
Section titled “Example”call("getLowBalance", {"i_account": 3092}){ "result": "OK", "threshold": 5.0, "notify_by_email": True, "charge_card": True, "charge_amount": 20.0, "i_debit_credit_card": None, "br_charge_card": False, "br_charge_amount": None, "br_i_debit_credit_card": None,}setLowBalance
Section titled “setLowBalance”Changes the low balance settings.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_account |
int | one of | ID of the account |
i_customer |
int | one of | ID of the customer |
| … | no | The fields of the low balance structure. Send None for threshold to disable it. The br_ fields apply to accounts only |
The panel accepts only a threshold and amounts greater than 0, and only cards that belong to the same account or customer.
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
Example
Section titled “Example”call("setLowBalance", { "i_account": 3092, "threshold": 5.0, "notify_by_email": True, "charge_card": True, "charge_amount": 20.0, "i_debit_credit_card": 41,}){"result": "OK"}