v20

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-214885191.3 KB
Auto Recharge

Set or update auto-recharge config for a customer

Persists 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.

put/v1/sdk/auto-recharge

Request body

currencystring required
customerEmailstring email
customerNamestring
customerRefstring required
deferSetupIntentboolean
enabledboolean required
maxMonthlySpendMajornumber
thresholdAmountMajornumber
topupAmountMajornumber
triggerType'balance' required

Response

Saved auto-recharge config and optional SetupIntent details.

publishableKeystring

Stripe publishable key for the resolved environment

setupClientSecretstring

Stripe SetupIntent client secret for card collection

stripeAccountIdstring

Connected Stripe account ID

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": "live",
    "thresholdAmountMajor": 5,
    "topupAmountMajor": 20
  }
}