---
title: "Create a Stripe checkout session (API key or session)"
method: POST
path: "/api/checkout"
tags: ["Billing"]
---

# Create a Stripe checkout session (API key or session)

`POST /api/checkout`

## Request

- Base URL: `https://verifly.email`
- URL: `https://verifly.email/api/checkout`
- Auth: HTTP bearer

Create a hosted Stripe checkout session for a credit package. Accepts an API key (Authorization: Bearer vf_...) OR a logged-in browser session. Body accepts package_id or packageId.

## Request body

- SimpleCheckoutRequest
  - `package_id` 'starter' | 'basic' | 'pro' | 'business' | 'enterprise', required
  - `packageId` string: Accepted alias of package_id.

## Response `200`

Stripe session.

- SimpleStripeResult
  - `success` boolean, required
  - `checkout_url` string, uri, required
  - `url` string, uri: Backwards-compat alias of checkout_url.
  - `session_id` string
  - `package` PackageRef
    - `id` string
    - `name` string
    - `credits` integer
    - `price_usd` string

## Other responses

- `400`: Invalid request or invalid input.
- `401`: Missing or invalid API key.
- `500`: Internal server error. Credits are refunded on failed verification exceptions where possible.

---

[API](https://skmtc.dev/verifly/apis/verifly-email-verification-api.md) · [All operations](https://skmtc.dev/verifly/apis/verifly-email-verification-api/llms.txt) · [OpenAPI document](https://skmtc.dev/verifly/apis/verifly-email-verification-api/revisions/9b2787c04363?raw)
