Set or update auto-recharge config for a customer
Changed onPersists the auto-recharge configuration for a customer. When no reusable card is on file, a Stripe SetupIntent client secret is returned so the caller can collect one.
Request
- Base URLhttps://api.solvapay.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Saved auto-recharge config and optional SetupIntent details.
Example response
{
"config": {
"enabled": true,
"maxMonthlySpendMinor": 10000,
"monthlySpendMinor": 4500,
"monthlySpendPeriod": "2026-07",
"topup": {
"amountMinor": 2000,
"currency": "USD",
"mode": "fixed"
},
"trigger": {
"thresholdAmountMinor": 500,
"type": "balance"
}
},
"display": {
"currency": "USD",
"exchangeRate": 1,
"formatted": {
"threshold": "$5.00",
"topup": "$20.00"
},
"rateSource": "db",
"thresholdAmountMajor": 5,
"topupAmountMajor": 20
}
}Changes
- warning
added the new
dbenum value to the/response property for the response status - warning
added the new
fallbackenum value to the/response property for the response status - warning
added the new
parityenum value to the/response property for the response status
- warning
- breaking
removed the required property
/from the response with the status - warning
removed the request property
- warning
removed the optional property
/from the response with the status - info
added the new optional request property
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
removed the
completedenum value from the/response property for the response status - info
added the required property
/to the response with the status
- breaking