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

# checkout.session.expired

> Fired when a Checkout Session times out without payment; draft records are cleaned up. Doc-only for parsing.



## OpenAPI

````yaml /api-reference/openapi.json post /webhook-events/checkout.session.expired
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /webhook-events/checkout.session.expired:
    post:
      tags:
        - Webhook Events
      summary: checkout.session.expired
      description: >-
        Fired when a Checkout Session times out without payment; draft records
        are cleaned up. Doc-only for parsing.
      responses:
        '200':
          description: Webhook payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhookDto.CheckoutSessionWebhookPayload'
components:
  schemas:
    webhookDto.CheckoutSessionWebhookPayload:
      type: object
      properties:
        checkout_session:
          $ref: '#/components/schemas/CheckoutSessionResponse'
        event_type:
          $ref: '#/components/schemas/types.WebhookEventName'
    CheckoutSessionResponse:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/types.CheckoutAction'
        cancel_url:
          type: string
        cancelled_at:
          type: string
          format: date-time
        checkout_invoice_id:
          type: string
          description: >-
            CheckoutInvoiceID and CheckoutPaymentID are set once the apply step

            creates the corresponding Flexprice entities (completed sessions
            only).
        checkout_payment_id:
          type: string
        checkout_status:
          $ref: '#/components/schemas/types.CheckoutStatus'
        completed_at:
          type: string
          format: date-time
        configuration:
          $ref: '#/components/schemas/checkout.JSONBCheckoutConfiguration'
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        customer_id:
          type: string
        environment_id:
          type: string
        expires_at:
          type: string
          description: |-
            ExpiresAt is required. A Temporal timer fires at this time for any
            session still in initiated|pending, marking it expired. The caller
            must create a new session after expiry (expire-and-restart model).
          format: date-time
        failure_reason:
          type: string
          description: FailureReason is a human-readable string set on failed sessions.
        failure_url:
          type: string
        id:
          type: string
        idempotency_key:
          type: string
          description: >-
            IdempotencyKey is caller-supplied. It is unique only while the
            session

            is active (initiated|pending). The same key may be reused once the

            session reaches a terminal state (completed|failed|expired).
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        payment_action:
          $ref: '#/components/schemas/types.PaymentAction'
        payment_provider:
          $ref: '#/components/schemas/types.CheckoutPaymentProvider'
        payment_provider_config:
          $ref: '#/components/schemas/checkout.JSONBCheckoutPaymentProviderConfig'
        provider_result:
          $ref: '#/components/schemas/checkout.JSONBCheckoutProviderResult'
        result:
          $ref: '#/components/schemas/checkout.JSONBCheckoutResult'
        status:
          $ref: '#/components/schemas/types.Status'
        success_url:
          type: string
          description: >-
            Redirect URLs sent to the payment provider. The provider redirects
            the

            user browser to the appropriate URL after the payment flow
            completes.
        tenant_id:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    types.WebhookEventName:
      type: string
      enum:
        - subscription.created
        - subscription.draft.created
        - subscription.activated
        - subscription.updated
        - subscription.paused
        - subscription.cancelled
        - subscription.resumed
        - subscription.phase.created
        - subscription.phase.updated
        - subscription.phase.deleted
        - feature.created
        - feature.updated
        - feature.deleted
        - feature.wallet_balance.alert
        - entitlement.created
        - entitlement.updated
        - entitlement.deleted
        - wallet.created
        - wallet.updated
        - wallet.terminated
        - wallet.transaction.created
        - wallet.transaction.updated
        - payment.created
        - payment.updated
        - payment.failed
        - payment.success
        - payment.pending
        - customer.created
        - customer.updated
        - customer.deleted
        - invoice.update.finalized
        - invoice.update.payment
        - invoice.update.voided
        - invoice.update
        - invoice.payment.overdue
        - wallet.credit_balance.dropped
        - wallet.credit_balance.recovered
        - wallet.ongoing_balance.dropped
        - wallet.ongoing_balance.recovered
        - wallet.ongoing_balance.updated
        - subscription.spend.threshold_reached
        - subscription.spend.threshold_recovered
        - subscription.line_item_spend.threshold_reached
        - subscription.line_item_spend.threshold_recovered
        - subscription.group_spend.threshold_reached
        - subscription.group_spend.threshold_recovered
        - subscription.renewal.due
        - invoice.communication.triggered
        - credit_note.created
        - credit_note.updated
        - checkout.session.initiated
        - checkout.session.completed
        - checkout.session.failed
        - checkout.session.expired
        - event.rejected
      x-enum-varnames:
        - WebhookEventSubscriptionCreated
        - WebhookEventSubscriptionDraftCreated
        - WebhookEventSubscriptionActivated
        - WebhookEventSubscriptionUpdated
        - WebhookEventSubscriptionPaused
        - WebhookEventSubscriptionCancelled
        - WebhookEventSubscriptionResumed
        - WebhookEventSubscriptionPhaseCreated
        - WebhookEventSubscriptionPhaseUpdated
        - WebhookEventSubscriptionPhaseDeleted
        - WebhookEventFeatureCreated
        - WebhookEventFeatureUpdated
        - WebhookEventFeatureDeleted
        - WebhookEventFeatureWalletBalanceAlert
        - WebhookEventEntitlementCreated
        - WebhookEventEntitlementUpdated
        - WebhookEventEntitlementDeleted
        - WebhookEventWalletCreated
        - WebhookEventWalletUpdated
        - WebhookEventWalletTerminated
        - WebhookEventWalletTransactionCreated
        - WebhookEventWalletTransactionUpdated
        - WebhookEventPaymentCreated
        - WebhookEventPaymentUpdated
        - WebhookEventPaymentFailed
        - WebhookEventPaymentSuccess
        - WebhookEventPaymentPending
        - WebhookEventCustomerCreated
        - WebhookEventCustomerUpdated
        - WebhookEventCustomerDeleted
        - WebhookEventInvoiceUpdateFinalized
        - WebhookEventInvoiceUpdatePayment
        - WebhookEventInvoiceUpdateVoided
        - WebhookEventInvoiceUpdate
        - WebhookEventInvoicePaymentOverdue
        - WebhookEventWalletCreditBalanceDropped
        - WebhookEventWalletCreditBalanceRecovered
        - WebhookEventWalletOngoingBalanceDropped
        - WebhookEventWalletOngoingBalanceRecovered
        - WebhookEventWalletOngoingBalanceUpdated
        - WebhookEventSubscriptionSpendThresholdReached
        - WebhookEventSubscriptionSpendThresholdRecovered
        - WebhookEventSubscriptionLineItemSpendThresholdReached
        - WebhookEventSubscriptionLineItemSpendThresholdRecovered
        - WebhookEventSubscriptionGroupSpendThresholdReached
        - WebhookEventSubscriptionGroupSpendThresholdRecovered
        - WebhookEventSubscriptionRenewalDue
        - WebhookEventInvoiceCommunicationTriggered
        - WebhookEventCreditNoteCreated
        - WebhookEventCreditNoteUpdated
        - WebhookEventCheckoutSessionInitiated
        - WebhookEventCheckoutSessionCompleted
        - WebhookEventCheckoutSessionFailed
        - WebhookEventCheckoutSessionExpired
        - WebhookEventEventRejected
      x-speakeasy-name-override: WebhookEventName
    types.CheckoutAction:
      type: string
      enum:
        - create_subscription
      x-enum-varnames:
        - CheckoutActionCreateSubscription
      x-speakeasy-name-override: CheckoutAction
    types.CheckoutStatus:
      type: string
      enum:
        - initiated
        - pending
        - completed
        - failed
        - expired
      x-enum-varnames:
        - CheckoutStatusInitiated
        - CheckoutStatusPending
        - CheckoutStatusCompleted
        - CheckoutStatusFailed
        - CheckoutStatusExpired
      x-speakeasy-name-override: CheckoutStatus
    checkout.JSONBCheckoutConfiguration:
      type: object
      properties:
        create_subscription_params:
          $ref: '#/components/schemas/types.CreateSubscriptionParams'
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    types.PaymentAction:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/types.PaymentActionType'
        url:
          type: string
      x-speakeasy-name-override: PaymentAction
    types.CheckoutPaymentProvider:
      type: string
      enum:
        - razorpay
      x-enum-varnames:
        - CheckoutPaymentProviderRazorpay
      x-speakeasy-name-override: CheckoutPaymentProvider
    checkout.JSONBCheckoutPaymentProviderConfig:
      type: object
      properties:
        collection_method:
          $ref: '#/components/schemas/types.CollectionMethod'
        max_mandate_limit:
          type: string
        payment_method:
          $ref: '#/components/schemas/types.PaymentMethodType'
    checkout.JSONBCheckoutProviderResult:
      type: object
      properties:
        expires_at:
          type: string
          description: >-
            ExpiresAt is the provider URL expiry. When set and earlier than the
            session expiry,

            executeCheckoutAction tightens the session expiry to match.
          format: date-time
        next_action:
          $ref: '#/components/schemas/types.PaymentAction'
        provider_metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            ProviderMetadata holds provider-specific data not needed for
            business logic.
        provider_payment_intent_id:
          type: string
          description: >-
            ProviderPaymentIntentID is the provider-side charge/intent ID.

            Stripe returns this at link creation (pi_xxx); others populate it
            from the webhook payload.
        provider_session_id:
          type: string
          description: >-
            ProviderSessionID is stored in EntityIntegrationMapping at link
            creation.
              Stripe:   Checkout Session ID  (cs_xxx)
              Razorpay: Payment Link ID      (plink_xxx)
              Nomod:    Payment Link ID      (NOTE: webhook uses Charge ID; look up by PaymentLinkID field)
              Moyasar:  Payment ID
    checkout.JSONBCheckoutResult:
      type: object
      properties:
        create_subscription_result:
          $ref: '#/components/schemas/types.CreateSubscriptionResult'
    types.Status:
      type: string
      enum:
        - published
        - deleted
        - archived
      x-enum-varnames:
        - StatusPublished
        - StatusDeleted
        - StatusArchived
      x-speakeasy-name-override: Status
    types.CreateSubscriptionParams:
      type: object
      properties:
        billing_period:
          $ref: '#/components/schemas/types.BillingPeriod'
        currency:
          type: string
        end_date:
          type: string
          format: date-time
        lookup_key:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        plan_id:
          type: string
        start_date:
          type: string
          format: date-time
      x-speakeasy-name-override: CreateSubscriptionParams
    types.PaymentActionType:
      type: string
      enum:
        - checkout_url
        - payment_link
      x-enum-varnames:
        - PaymentActionTypeCheckoutURL
        - PaymentActionTypePaymentLink
      x-speakeasy-name-override: PaymentActionType
    types.CollectionMethod:
      type: string
      enum:
        - charge_automatically
        - send_invoice
      x-enum-varnames:
        - CollectionMethodChargeAutomatically
        - CollectionMethodSendInvoice
      x-speakeasy-name-override: CollectionMethod
    types.PaymentMethodType:
      type: string
      enum:
        - CARD
        - ACH
        - OFFLINE
        - CREDITS
        - PAYMENT_LINK
        - UPI
      x-enum-varnames:
        - PaymentMethodTypeCard
        - PaymentMethodTypeACH
        - PaymentMethodTypeOffline
        - PaymentMethodTypeCredits
        - PaymentMethodTypePaymentLink
        - PaymentMethodTypeUPI
      x-speakeasy-name-override: PaymentMethodType
    types.CreateSubscriptionResult:
      type: object
      properties:
        invoice_id:
          type: string
        payment_id:
          type: string
        subscription_id:
          type: string
      x-speakeasy-name-override: CreateSubscriptionResult
    types.BillingPeriod:
      type: string
      enum:
        - MONTHLY
        - ANNUAL
        - WEEKLY
        - DAILY
        - QUARTERLY
        - HALF_YEARLY
        - ONETIME
      x-enum-varnames:
        - BILLING_PERIOD_MONTHLY
        - BILLING_PERIOD_ANNUAL
        - BILLING_PERIOD_WEEKLY
        - BILLING_PERIOD_DAILY
        - BILLING_PERIOD_QUARTER
        - BILLING_PERIOD_HALF_YEAR
        - BILLING_PERIOD_ONETIME
      x-speakeasy-name-override: BillingPeriod

````