import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const autoRechargePrefs = await client.payment.autoRechargePrefs.list();
console.log(autoRechargePrefs.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"
}
}Returns the payment auto recharge preferences.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const autoRechargePrefs = await client.payment.autoRechargePrefs.list();
console.log(autoRechargePrefs.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"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful response
Show child attributes
The unique identifier for the auto recharge preference.
"1524126400473204723"
The record type.
"auto_recharge_pref"
The threshold amount at which the account will be recharged.
"104.00"
The amount to recharge the account, the actual recharge amount will be the amount necessary to reach the threshold amount plus the recharge amount.
"104.00"
Whether auto recharge is enabled.
true
true
The payment preference for auto recharge.
credit_paypal, ach "credit_paypal"
Was this page helpful?