> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Create Checkout Session

> Create a Stripe-hosted, embedded, Elements, or form Checkout Session.

Use `stripe.createCheckoutSession` to create a Stripe-hosted, embedded, Elements, or form Checkout Session.

## Example

```ts automations/stripe-create-checkout-session.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { stripe } from "automate.ax/stripe"

export default automation("Create Checkout Session", () => {
  onDashboardRun({ title: "Create Checkout Session" })

  stripe.createCheckoutSession({
    mode: "payment",
    lineItems: [{ price: "price_123", quantity: 1 }],
    successUrl: "https://example.com/success",
  })
})
```

## Inputs

Choose `payment`, `setup`, or `subscription` mode and provide the matching Stripe fields. `uiMode` accepts `hosted_page`, `embedded_page`, `elements`, or `form`; only `hosted_page` accepts `successUrl`. `idempotencyKey` is optional.

Inputs use camel case and accept compatible signals. Automate.ax converts provider fields to Stripe's wire format. Metadata keys remain unchanged.

## Output

Returns the created Stripe Checkout Session, including its hosted URL when applicable. Output fields use camel case. Stripe decimal fields such as `fxRate` are lossless strings.
