---
title: "Start a membership purchase for the current buyer"
method: POST
path: "/account/membership/purchases"
tags: ["Membership"]
---

# Start a membership purchase for the current buyer

`POST /account/membership/purchases`

## Request

- Base URL: `https://api.session.services`
- URL: `https://api.session.services/account/membership/purchases`
- Auth: API key in header `x-tenant-id`

Creates the provider subscription for the signed-in buyer and returns what the browser needs to collect the first annual payment. A pending attempt for the same program is reused.

## Request body

- object
  - `programId` string, required
  - `termsAccepted` unknown, required

## Response `200`

OK

- object
  - `purchase` object, required: A checkout attempt for a membership program
    - `id` string, required: Membership purchase ID
    - `programId` string, required
    - `teamId` string, required
    - `state` 'PENDING' | 'COMPLETED' | 'DUPLICATE', required: PENDING until the provider confirms payment. DUPLICATE means a payment arrived for a user who already held an active pass and needs a manual refund.
    - `price` integer, required
    - `currency` string, required
    - `termsUrl` string, uri, required
    - `expiresAt` string, date-time, required: When the provider abandons an unpaid attempt
    - `passId` string
  - `payment` object, required: What the browser needs to collect the first payment
    - `provider` 'STRIPE', required
    - `clientSecret` string, required: Client secret that confirms the first invoice
    - `stripeAccountId` string, required: Connected account the payment is taken on

## Other responses

- `400`: 400
- `401`: 401
- `403`: 403
- `404`: 404
- `409`: 409
- `412`: 412
- `422`: 422
- `429`: 429
- `500`: 500
- `501`: 501
- `503`: 503

## Changes

- **2026-11-09** `38649d1c1ac7`: 1 warning
  - the `programId` request property's maxLength was set to `128`
- **2026-11-09** `24b4e38e7054`: 5 breaking
  - the `purchase/currency` response property's maxLength was unset from `3` for the response status `200`
  - the `purchase/currency` response property's minLength was decreased from `3` to `0` for the response status `200`
  - the `purchase/expiresAt` response's property format changed from `date-time` to no format for status `200`
  - the `purchase/price` response's property type changed from `integer` to `number` for status `200`
  - …1 more
- **2026-09-26** `b06650f199b3`: 1 warning
  - added the new `MEMBERSHIP_SUSPENDED` enum value to the `oneOf[subschema #1]/data/reason` response property for the response status `409`
- **2026-09-21** `ec5d8889f2d0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/session/apis/session-services-api/changes/account/membership/purchases/post.md)

---

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