---
title: "Collect a card in Stripe-hosted Checkout"
method: POST
path: "/v1/billing/setup-session"
tags: ["billing"]
---

# Collect a card in Stripe-hosted Checkout

`POST /v1/billing/setup-session`

## Request

- Base URL: `https://api.hyperresearch.ai`
- URL: `https://api.hyperresearch.ai/v1/billing/setup-session`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `hr_session`

Creates a Stripe Checkout session in setup mode (card only, no charge) and returns its URL. The console redirects there; success/cancel return to allowlisted console paths.

## Request body

- BillingSetupSessionBody
  - `return_path` string
  - `cancel_path` string

## Response `200`

Checkout URL

- BillingSessionUrl
  - `url` string, required

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `403`: Insufficient scope or plan
- `404`: Not found
- `429`: Rate limited or over quota
- `500`: Internal error

---

[API](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api.md) · [All operations](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api/revisions/726ef831ebf4?raw)
