type alias CheckoutSessionResult

Result of creating a checkout session.

  • Success: { sessionId, checkoutUrl }
  • User-facing error (e.g. invalid phone): { error }
  • Internal/unknown failure: null

Definition

{ sessionId: string; checkoutUrl: string; }
| { error: string; }
| null

Usage

import { type CheckoutSessionResult } from "docs/payments.ts";