post:
  tags:
    - Purchases
  summary: Add balance to a purchase
  description: |
    For subscription and installment payments - add balance to the order.
    This will be billed with the next payments.
  security:
    - ApiKeyAuth: []
  parameters:
    - name: purchase_id
      in: query
      required: true
      description: The Digistore24 order ID
      schema:
        type: string
    - name: amount
      in: query
      required: true
      description: The balance to be added in the currency of the order. If amount is <0, the balance will be reduced. The balance cannot be less than 0.
      schema:
        type: number
        format: float
  responses:
    '200':
      description: Balance successfully updated
      content:
        application/json:
          schema:
            type: object
            properties:
              old_balance:
                type: number
                description: The old balance
              new_balance:
                type: number
                description: The new (current) balance
    '403':
      description: Access denied - Full access required
    '400':
      description: Invalid request parameters
