---
title: "Buy a credit pack, start a monthly plan (Starter or Scale), or add credits to a plan at its rate (opens at public launch)"
method: POST
path: "/billing/checkout-sessions"
tags: ["billing"]
---

# Buy a credit pack, start a monthly plan (Starter or Scale), or add credits to a plan at its rate (opens at public launch)

`POST /billing/checkout-sessions`

## Request

- Base URL: `https://api.letsship.ai/v1`
- URL: `https://api.letsship.ai/v1/billing/checkout-sessions`
- Auth: none declared

## Headers

- `idempotency-key` string

## Request body

- CreateCheckoutSessionRequest
  - `orgId` string
  - `offer` 'credit_pack_10' | 'credit_pack_50' | 'credit_pack_100' | 'team' | 'team_credits', required
  - `quantity` integer
  - `teamPlan` 'starter' | 'scale'
  - `startNowConsent` StartNowConsent
    - `wordingVersion` string, required

## Response `200`

Hosted checkout

- CheckoutSessionResponse
  - `checkoutId` string, required
  - `url` string, uri, required

## Other responses

- `400`: The start-now request is missing or out of date (code consent_required), the plan to buy is missing or unknown (code team_plan_required), or the credits are out of range or a pack or plan quantity is not 1 (code quantity_out_of_range)
- `401`: Unauthenticated
- `403`: Not a billing manager (billing_manage_required) or an Enterprise org (plan_not_purchasable)
- `404`: Buying credits is not available yet (code not_available), or not one of the caller's orgs
- `409`: The offer is not for this org's plan (code offer_not_for_plan), a plan checkout is already open (code checkout_in_progress), or no plan month is running yet for added credits (code team_month_required)
- `502`: The payment page could not be opened (code checkout_failed); nothing was charged
- `503`: Checkout is not set up in this environment (code checkout_not_configured)

---

[API](https://skmtc.dev/letsship/apis/ship-api.md) · [All operations](https://skmtc.dev/letsship/apis/ship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/letsship/apis/ship-api/revisions/e6eac1bcadd4?raw)
