---
title: "Prepare the payment form for the current buyer"
method: POST
path: "/account/membership/payment-session"
tags: ["Membership"]
---

# Prepare the payment form for the current buyer

`POST /account/membership/payment-session`

## Request

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

Ensures the signed-in buyer exists as a customer on the team's connected account and returns a customer session so the payment form can show their saved cards.

## Request body

- object
  - `programId` string, required

## Response `200`

OK

- object: What the payment form needs before the purchase starts
  - `provider` 'STRIPE', required
  - `stripeAccountId` string, required: Connected account the payment form must be loaded for
  - `customerSessionClientSecret` string: Lets the payment form show the buyer's saved cards. Absent when the provider declined to issue one.

## 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-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-22** `ec9e96859756`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/session/apis/session-services-api/changes/account/membership/payment-session/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)
