Skip to main content
PATCH
/
payment
/
auto_recharge_prefs
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const autoRechargePref = await client.payment.autoRechargePrefs.update();

console.log(autoRechargePref.data);
{
  "data": {
    "id": "1524126400473204723",
    "record_type": "auto_recharge_pref",
    "threshold_amount": "104.00",
    "recharge_amount": "104.00",
    "enabled": true,
    "invoice_enabled": true,
    "preference": "credit_paypal"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Details to update auto recharge preferences

threshold_amount
string<decimal>

The threshold amount at which the account will be recharged.

Example:

"104.00"

recharge_amount
string<decimal>

The amount to recharge the account, the actual recharge amount will be the amount necessary to reach the threshold amount plus the recharge amount.

Example:

"104.00"

enabled
boolean

Whether auto recharge is enabled.

Example:

true

invoice_enabled
boolean
Example:

true

preference
enum<string>

The payment preference for auto recharge.

Available options:
credit_paypal,
ach
Example:

"credit_paypal"

Response

Successful response

data
object