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

# Finalize Lock

> Finalize a previously locked balance. Use 'confirm' to commit the deduction, or 'release' to return the held balance.

### Body Parameters

The lock ID that was passed into the previous check call.

Use 'confirm' to commit the deduction, or 'release' to return the held balance.

Additional properties to attach to this finalize lock event.

Additional properties to attach to this finalize lock event.

The customer the lock belongs to. A lock of any other customer is not found.

### Response


## OpenAPI

````yaml openapi POST /v1/balances.finalize
openapi: 3.1.0
info:
  title: Autumn API
  version: 2.6.0
servers:
  - url: https://api.useautumn.com
    description: Production server
security:
  - secretKey: []
paths:
  /v1/balances.finalize:
    post:
      tags:
        - balances
      description: >-
        Finalize a previously locked balance. Use 'confirm' to commit the
        deduction, or 'release' to return the held balance.
      operationId: finalizeLock
      parameters:
        - name: x-api-version
          in: header
          required: true
          schema:
            type: string
            default: 2.6.0
          x-speakeasy-globals-hidden: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                lock_id:
                  type: string
                  description: The lock ID that was passed into the previous check call.
                action:
                  enum:
                    - confirm
                    - release
                  type: string
                  description: >-
                    Use 'confirm' to commit the deduction, or 'release' to
                    return the held balance.
                override_value:
                  type: number
                  description: Additional properties to attach to this finalize lock event.
                properties:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                  description: Additional properties to attach to this finalize lock event.
                customer_id:
                  type: string
                  minLength: 1
                  description: >-
                    The customer the lock belongs to. A lock of any other
                    customer is not found.
              required:
                - lock_id
                - action
                - customer_id
              title: FinalizeBalanceParams
              examples:
                - customer_id: cus_123
                  lock_id: lock_abc123
                  action: confirm
                - customer_id: cus_123
                  lock_id: lock_abc123
                  action: confirm
                  override_value: 3
                - customer_id: cus_123
                  lock_id: lock_abc123
                  action: release
            example:
              customer_id: cus_123
              lock_id: lock_abc123
              action: confirm
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
        '202':
          description: >-
            Accepted. Autumn is experiencing degraded service from a downstream
            provider, so the finalize request was allowed fail-open.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Autumn } from 'autumn-js'

            const autumn = new Autumn()

            const result = await autumn.balances.finalize({
              lockId: "lock_abc123",
              action: "confirm",
              customerId: "cus_123",
            });
        - lang: python
          label: Python (SDK)
          source: |-
            from autumn_sdk import Autumn

            autumn = Autumn(secret_key="am_sk_test...")

            res = autumn.balances.finalize(
                lock_id="lock_abc123",
                action="confirm",
                customer_id="cus_123",
            )
components:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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