Перейти до вмісту

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.

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

Returns the low balance settings.

Name Type Required Description
i_account int one of ID of the account
i_customer int one of ID of the customer
Name Type Description
result string OK
… The fields of the low balance structure. The br_ fields are returned for accounts only
request
call("getLowBalance", {"i_account": 3092})
response
{
"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,
}

Changes the low balance settings.

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.

Name Type Description
result string OK
request
call("setLowBalance", {
"i_account": 3092,
"threshold": 5.0,
"notify_by_email": True,
"charge_card": True,
"charge_amount": 20.0,
"i_debit_credit_card": 41,
})
response
{"result": "OK"}