> ## 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.

# commitment.updated

> Fired when a commitment's descriptive fields are updated. Doc-only for parsing.



## OpenAPI

````yaml https://swagger.flexprice.io post /webhook-events/commitment.updated
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/commitment.updated:
    post:
      tags:
        - Webhook Events
      summary: commitment.updated
      description: >-
        Fired when a commitment's descriptive fields are updated. Doc-only for
        parsing.
      responses:
        '200':
          description: Webhook payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhookDto.CommitmentWebhookPayload'
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from flexprice import Flexprice


            with Flexprice(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as f_client:

                res = f_client.webhook_events.post_webhook_events_commitment_updated()

                # Handle response
                print(res)
        - lang: typescript
          label: TypeScript
          source: |-
            import { Flexprice } from "@flexprice/sdk";

            const flexprice = new Flexprice({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await flexprice.webhookEvents.postWebhookEventsCommitmentUpdated();

              console.log(result);
            }

            run();
        - lang: go
          label: Go
          source: "package main\n\nimport(\n\t\"context\"\n\tflexprice \"github.com/flexprice/go-sdk/v2\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := flexprice.New(\n        flexprice.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n    )\n\n    res, err := s.WebhookEvents.PostWebhookEventsCommitmentUpdated(ctx)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.WebhookDtoCommitmentWebhookPayload != nil {\n        // handle response\n    }\n}"
components:
  schemas:
    webhookDto.CommitmentWebhookPayload:
      type: object
      properties:
        commitment:
          $ref: '#/components/schemas/CommitmentResponse'
        event_type:
          $ref: '#/components/schemas/types.WebhookEventName'
    CommitmentResponse:
      type: object
      properties:
        active_windows:
          type: array
          items:
            $ref: '#/components/schemas/types.ActiveWindow'
        binding:
          type: boolean
        collection_method:
          $ref: '#/components/schemas/types.CommitmentCollectionMethod'
        commitment_status:
          $ref: '#/components/schemas/types.CommitmentStatus'
        commitment_value:
          type: string
        committed_price_id:
          type: string
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        currency:
          type: string
        customer_id:
          type: string
        end_date:
          type: string
          format: date-time
        environment_id:
          type: string
        id:
          type: string
        idempotency_key:
          type: string
        instalment_invoicing:
          type: string
        invoice_description:
          type: string
        invoice_label:
          type: string
        measurement:
          $ref: '#/components/schemas/types.CommitmentMeasurement'
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        name:
          type: string
        on_early_termination:
          $ref: '#/components/schemas/types.CommitmentEarlyTermination'
        overage_price_id:
          type: string
        priority:
          type: integer
        scope_entity_id:
          type: string
        scope_entity_type:
          $ref: '#/components/schemas/types.CommitmentScopeType'
        start_date:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/types.Status'
        subscription_id:
          type: string
        tenant_id:
          type: string
        terminated_at:
          type: string
          format: date-time
        termination_invoice_id:
          type: string
        timezone:
          type: string
        total_amount:
          type: string
        type:
          $ref: '#/components/schemas/types.CommitmentType'
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
        value:
          type: string
    types.WebhookEventName:
      type: string
      enum:
        - subscription.created
        - subscription.draft.created
        - subscription.activated
        - subscription.updated
        - subscription.paused
        - subscription.cancelled
        - subscription.resumed
        - subscription.plan_changed
        - 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
        - commitment.created
        - commitment.updated
        - commitment.terminated
        - wallet.created
        - wallet.updated
        - wallet.terminated
        - wallet.transaction.created
        - wallet.transaction.updated
        - payment.created
        - payment.updated
        - payment.failed
        - payment.success
        - payment.pending
        - refund.created
        - refund.succeeded
        - refund.failed
        - customer.created
        - customer.updated
        - customer.deleted
        - invoice.update.finalized
        - invoice.update.payment
        - invoice.update.voided
        - invoice.update
        - invoice.payment.overdue
        - invoice.sync.success
        - invoice.sync.failed
        - 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
        - entitlement.grant.exhausted
        - 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
        - WebhookEventSubscriptionPlanChanged
        - WebhookEventSubscriptionPhaseCreated
        - WebhookEventSubscriptionPhaseUpdated
        - WebhookEventSubscriptionPhaseDeleted
        - WebhookEventFeatureCreated
        - WebhookEventFeatureUpdated
        - WebhookEventFeatureDeleted
        - WebhookEventFeatureWalletBalanceAlert
        - WebhookEventEntitlementCreated
        - WebhookEventEntitlementUpdated
        - WebhookEventEntitlementDeleted
        - WebhookEventCommitmentCreated
        - WebhookEventCommitmentUpdated
        - WebhookEventCommitmentTerminated
        - WebhookEventWalletCreated
        - WebhookEventWalletUpdated
        - WebhookEventWalletTerminated
        - WebhookEventWalletTransactionCreated
        - WebhookEventWalletTransactionUpdated
        - WebhookEventPaymentCreated
        - WebhookEventPaymentUpdated
        - WebhookEventPaymentFailed
        - WebhookEventPaymentSuccess
        - WebhookEventPaymentPending
        - WebhookEventRefundCreated
        - WebhookEventRefundSucceeded
        - WebhookEventRefundFailed
        - WebhookEventCustomerCreated
        - WebhookEventCustomerUpdated
        - WebhookEventCustomerDeleted
        - WebhookEventInvoiceUpdateFinalized
        - WebhookEventInvoiceUpdatePayment
        - WebhookEventInvoiceUpdateVoided
        - WebhookEventInvoiceUpdate
        - WebhookEventInvoicePaymentOverdue
        - WebhookEventInvoiceSyncSuccess
        - WebhookEventInvoiceSyncFailed
        - WebhookEventWalletCreditBalanceDropped
        - WebhookEventWalletCreditBalanceRecovered
        - WebhookEventWalletOngoingBalanceDropped
        - WebhookEventWalletOngoingBalanceRecovered
        - WebhookEventWalletOngoingBalanceUpdated
        - WebhookEventSubscriptionSpendThresholdReached
        - WebhookEventSubscriptionSpendThresholdRecovered
        - WebhookEventSubscriptionLineItemSpendThresholdReached
        - WebhookEventSubscriptionLineItemSpendThresholdRecovered
        - WebhookEventSubscriptionGroupSpendThresholdReached
        - WebhookEventSubscriptionGroupSpendThresholdRecovered
        - WebhookEventEntitlementGrantExhausted
        - WebhookEventSubscriptionRenewalDue
        - WebhookEventInvoiceCommunicationTriggered
        - WebhookEventCreditNoteCreated
        - WebhookEventCreditNoteUpdated
        - WebhookEventCheckoutSessionInitiated
        - WebhookEventCheckoutSessionCompleted
        - WebhookEventCheckoutSessionFailed
        - WebhookEventCheckoutSessionExpired
        - WebhookEventEventRejected
      x-speakeasy-name-override: WebhookEventName
    types.ActiveWindow:
      type: object
      properties:
        end:
          $ref: '#/components/schemas/types.Bucket'
        start:
          $ref: '#/components/schemas/types.Bucket'
      x-speakeasy-name-override: ActiveWindow
    types.CommitmentCollectionMethod:
      type: string
      enum:
        - per_period
        - billing_terms
      x-enum-varnames:
        - CommitmentCollectionPerPeriod
        - CommitmentCollectionBillingTerms
      x-speakeasy-name-override: CommitmentCollectionMethod
    types.CommitmentStatus:
      type: string
      enum:
        - active
        - ended
        - terminated
      x-enum-varnames:
        - CommitmentStatusActive
        - CommitmentStatusEnded
        - CommitmentStatusTerminated
      x-speakeasy-name-override: CommitmentStatus
    types.CommitmentMeasurement:
      type: string
      enum:
        - billing_period
        - window
      x-enum-varnames:
        - CommitmentMeasurementBillingPeriod
        - CommitmentMeasurementWindow
      x-speakeasy-name-override: CommitmentMeasurement
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    types.CommitmentEarlyTermination:
      type: string
      enum:
        - forfeit
        - credit_note
        - bill_remaining
      x-enum-varnames:
        - CommitmentTerminationForfeit
        - CommitmentTerminationCreditNote
        - CommitmentTerminationBillRemaining
      x-speakeasy-name-override: CommitmentEarlyTermination
    types.CommitmentScopeType:
      type: string
      enum:
        - subscription
        - group
        - meter
        - price
      x-enum-varnames:
        - CommitmentScopeSubscription
        - CommitmentScopeGroup
        - CommitmentScopeMeter
        - CommitmentScopePrice
      x-speakeasy-name-override: CommitmentScopeType
    types.Status:
      type: string
      enum:
        - published
        - deleted
        - archived
      x-enum-varnames:
        - StatusPublished
        - StatusDeleted
        - StatusArchived
      x-speakeasy-name-override: Status
    types.CommitmentType:
      type: string
      enum:
        - amount
        - quantity
      x-enum-varnames:
        - COMMITMENT_TYPE_AMOUNT
        - COMMITMENT_TYPE_QUANTITY
      x-speakeasy-name-override: CommitmentType
    types.Bucket:
      type: object
      properties:
        hour:
          maximum: 24
          minimum: 0
          type: integer
        minute:
          maximum: 59
          minimum: 0
          type: integer
      x-speakeasy-name-override: Bucket

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.