Update auto recharge preferences
PATCH/payment/auto_recharge_prefs
Update payment auto recharge preferences.
Request
- application/json
Body
required
Details to update auto recharge preferences
threshold_amount decimal
The threshold amount at which the account will be recharged.
recharge_amount 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.
enabled boolean
Whether auto recharge is enabled.
invoice_enabled boolean
preference string
Possible values: [credit_paypal
, ach
]
The payment preference for auto recharge.
Responses
200: Successful response
- application/json
401: Unauthorized
404: Resource not found
422: Bad request
Request samples
curl -L -X PATCH 'https://api.telnyx.com/v2/payment/auto_recharge_prefs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"threshold_amount": "104.00",
"recharge_amount": "104.00",
"enabled": true,
"invoice_enabled": true,
"preference": "credit_paypal"
}'
Response samples
{
"data": {
"id": "1524126400473204723",
"record_type": "auto_recharge_pref",
"threshold_amount": "104.00",
"recharge_amount": "104.00",
"enabled": true,
"invoice_enabled": true,
"preference": "credit_paypal"
}
}