---
title: "Create Checkout Session"
method: POST
path: "/iap/checkout-sessions"
tags: ["Checkout"]
---

# Create Checkout Session

`POST /iap/checkout-sessions`

Creates a Stripe Checkout Session for browser-based checkout. Returns a URL to redirect the user to Stripe's hosted checkout page.

## Request body

- object
  - `product_id` string, required — The product's `reference_id` (e.g., `com.app.premium`).
  - `external_user_id` string — The user's external ID. Either this or `user_id` is required.
  - `user_id` string — Alias for `external_user_id`. Either this or `external_user_id` is required.
  - `platform` 'ios' | 'android' | 'web' — The platform the purchase is being made from.
  - `stripe_customer_id` string — Existing Stripe customer ID to attach the payment to.
  - `rc_app_user_id` string — RevenueCat app user ID, if using RevenueCat integration.

## Response `200`

Checkout session created successfully

- CheckoutSessionResponse — Response from creating a checkout session.
  - `checkout_session_id` string — Stripe Checkout Session ID.
  - `url` string — URL to redirect the user to for checkout.
  - `client_secret` string — Client secret for embedded checkout.
  - `transaction_id` string — ZeroSettle transaction ID.

## Other responses

- `400` — Invalid request -- missing or malformed parameters.
- `401` — Invalid or missing API key.
- `502` — Upstream service error (Stripe, Apple).

---

[API](https://skmtc.net/zerosettle/apis/zerosettle-iap-api.md) · [All operations](https://skmtc.net/zerosettle/apis/zerosettle-iap-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zerosettle/zerosettle-iap-api/versions/1a7aa12f3d5e/schema)
