---
title: "Set Auto Recharge"
method: POST
path: "/api/wallet/auto-recharge"
tags: ["wallet"]
---

# Set Auto Recharge

`POST /api/wallet/auto-recharge`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/wallet/auto-recharge`
- Auth: HTTP bearer

Configure auto-recharge: below thresholdCents, charge the saved card
for amountCents (max 3x/24h, 6h backoff after a failed charge).

Enabling requires a saved card RIGHT NOW (2026-07-17 decision): an
opt-in that cannot charge is worse than none, because the user believes
refills are armed while the sweep fails forever. Callers get a 400 with
a machine-readable `code` (SDKs wrap this endpoint). Disabling is never
blocked. The check is skipped only when Stripe itself is unconfigured
(dev environments, where the sweep could not charge anyway).

## Request body

- AutoRechargeConfig
  - `enabled` boolean, required
  - `thresholdCents` integer, nullable
  - `amountCents` integer, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/maritime/apis/maritime-api.md) - [All operations](https://skmtc.dev/maritime/apis/maritime-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maritime/apis/maritime-api/revisions/acd712090ad6?raw)
