---
title: "Save a card for auto-recharge"
method: POST
path: "/billing/auto-recharge/setup"
tags: ["billing"]
---

# Save a card for auto-recharge

`POST /billing/auto-recharge/setup`

## Request

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

Open a hosted Stripe Checkout (mode=setup) to save a reusable card.

Returns the checkout URL for client redirect. On completion the setup webhook
persists the PaymentMethod onto the user's config; the user can then enable
auto-recharge via PUT /billing/auto-recharge.

## Headers

- `X-API-Key` string, nullable

## Request body

- AutoRechargeSetupRequest: Request body to open a hosted Checkout for saving an auto-recharge card.
  - `success_url` string, required
  - `cancel_url` string, required

## Response `200`

Successful Response

- ApiResponseAutoRechargeSetupResponse
  - `data` AutoRechargeSetupResponse: Response body with the hosted setup-Checkout URL.
    - `checkout_url` string, required
    - `session_id` string, required
  - `error` ErrorDetail: Structured error information for API error responses. Attributes: code: Machine-readable error code (e.g. "JOB_NOT_FOUND"). message: Human-readable error description. details: Optional additional context for debugging.
    - `code` string, required
    - `message` string, required
    - `details` object, nullable
  - `meta` object, nullable

## Other responses

- `401`: Unauthorized — missing or invalid API key/JWT.
- `422`: Validation Error

---

[API](https://skmtc.dev/whoisgeni/apis/whoisgenius.md) · [All operations](https://skmtc.dev/whoisgeni/apis/whoisgenius/llms.txt) · [OpenAPI document](https://skmtc.dev/whoisgeni/apis/whoisgenius/revisions/707f1c34f6b3?raw)
