> ## Documentation Index
> Fetch the complete documentation index at: https://fermata-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mid-month modification of monthly auto-refill

> This endpoint changes the auto-refill monthly setting on the account balance in a prorated way. It is only used to increase the refill amount. It follows the following process:
Issue new tokens to account for given cost
Figure out value of remaining tokens from previous refill and subtract that amount from the cost of the new refill
Cancel all remaining tokens from previous refill
User's credit card is charged that prorated calculated cost
User's refill day is modified to start a new month today



## OpenAPI

````yaml POST /v1/accounts/{account_id}/modifymidmonth
openapi: 3.1.0
info:
  version: '0.1'
  title: Fermata API
  summary: >-
    Fermata is a billing engine that supports prepaid balances and real-time
    usage computation
  description: ''
servers:
  - url: https://api.gofermata.com
security:
  - apiKey: []
paths:
  /v1/accounts/{account_id}/modifymidmonth:
    post:
      summary: Mid-month modification of monthly auto-refill
      description: >-
        This endpoint changes the auto-refill monthly setting on the account
        balance in a prorated way. It is only used to increase the refill
        amount. It follows the following process:

        Issue new tokens to account for given cost

        Figure out value of remaining tokens from previous refill and subtract
        that amount from the cost of the new refill

        Cancel all remaining tokens from previous refill

        User's credit card is charged that prorated calculated cost

        User's refill day is modified to start a new month today
      operationId: post-accounts-account_id-modify_monthly
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                account_id:
                  type: string
                denomination:
                  type: string
                amount:
                  type: integer
                usd_charge:
                  type: integer
                dryrun:
                  type: boolean
              required:
                - account_id
                - denomination
                - amount
                - usd_charge
            examples:
              Example 1:
                value:
                  account_id: string
                  denomination: string
                  amount: integer
                  usd_charge: string
                  dryrun: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: string
                      isdryrun:
                        type: boolean
                      amount:
                        type: integer
                      denomination:
                        type: string
                      refill_amount:
                        type: integer
                      refill_day:
                        type: integer
                      refill_usd_amount:
                        type: integer
                      usd_amount_charged:
                        type: string
      security:
        - apiKey: []
      servers:
        - url: https://api.gofermata.com
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: basic

````