POST /v1/checkoutCreate Stripe checkout session
Platform platform (cross-worker)
Starts the payment step for moving a key onto a paid plan. Creates a Stripe Checkout Session for upgrading an API key to a paid tier (Starter, Pro, or Business). Returns the checkout URL for redirect.
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
tier | string | Yes | Target tier (starter/pro/biz) |
key_hash | string | No | SHA-256 hash of API key |
success_url | string | No | Redirect on success |
cancel_url | string | No | Redirect on cancel |
Response Schema
url (string): Stripe Checkout Session URL
session_id (string): Checkout session ID
cURL Example
curl -X POST 'https://laminarforge.dev/v1/checkout' -H 'Authorization: Bearer lf_YourApiKey' -H 'Content-Type: application/json' -d '{"tier":"starter"}'Python Example
import requests
url = 'https://laminarforge.dev/v1/checkout'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
data = {'tier': 'starter'}
response = requests.post(url, headers=headers, json=data)
print(response.json())