---
title: "Start a subscription through Stripe's hosted Checkout"
method: POST
path: "/billing/checkout-session"
tags: ["Billing"]
---

# Start a subscription through Stripe's hosted Checkout

`POST /billing/checkout-session`

## Request

- Base URL: `https://whatareyoudo.ing/api/v1`
- URL: `https://whatareyoudo.ing/api/v1/billing/checkout-session`
- Auth: HTTP bearer

For Windows and Linux, which have no browser engine to mount the Payment Element in: they open this URL in the system browser and come back over a loopback address. `returnUrl` is sent by the client because it binds an ephemeral port, and anything that is not a plain http loopback address is refused.

## Request body

- DesktopCheckoutSessionRequest
  - `locale` string
  - `returnUrl` string, required

## Response `200`

OK

- object
  - `data` object, required
    - `url` string, required
    - `sessionId` string, required
    - `trialDays` integer, required
  - `meta` object, required
    - `requestId` string, required

## Other responses

- `422`: returnUrl is not a loopback http address

---

[API](https://skmtc.dev/whatareyoudo/apis/whatcha-api.md) · [All operations](https://skmtc.dev/whatareyoudo/apis/whatcha-api/llms.txt) · [OpenAPI document](https://skmtc.dev/whatareyoudo/apis/whatcha-api/revisions/48dd8a54abea?raw)
