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

# Update a customer balance transaction

> Re-scope a customer balance transaction to an application, or remove the scope.



## OpenAPI

````yaml openapi-billing.json POST /v1/customer_balance_transactions/{id}
openapi: 3.1.0
info:
  title: Yorlet Billing API
  description: APIs for managing invoices, coupons, credit grants, and subscription items.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/customer_balance_transactions/{id}:
    post:
      tags:
        - Customer Balance Transactions
      summary: Update a customer balance transaction
      description: >-
        Re-scope a customer balance transaction to an application, or remove the
        scope.
      operationId: customer_balance_transactions_update
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                application:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The ID of the application to reserve this balance for, or
                    null to make it unscoped.
      responses:
        '200':
          description: Update a customer balance transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - customer_balance_transaction
                  amount:
                    type: integer
                    description: The amount of the transaction.
                  application:
                    type:
                      - string
                      - 'null'
                    default: null
                    description: >-
                      The ID of the application this balance is reserved for, if
                      scoped.
                  currency:
                    type: string
                    description: The currency of the transaction.
                  customer:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                    description: The customer this transaction is for.
                  description:
                    type:
                      - string
                      - 'null'
                    description: >-
                      An arbitrary string attached to the object. Often useful
                      for displaying to users.
                  ending_balance:
                    type: integer
                    description: The ending balance of the transaction.
                  invoice:
                    type:
                      - string
                      - 'null'
                    description: The invoice attached to the transaction.
                  type:
                    type:
                      - string
                      - 'null'
                    enum:
                      - adjustment
                      - advance_rent
                      - applied_to_invoice
                      - credit_note
                      - holding_fee
                      - payment
                      - refund
                      - unapplied_from_invoice
                      - null
                    description: The type of the transaction.
                required:
                  - id
                  - created
                  - object
                  - amount
                  - currency
                  - customer
                  - description
                  - ending_balance
                  - invoice
                  - type
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````