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

# Update Numbering Settings

> Updates the invoice number prefix and/or the next number. The prefix supports a {year} token replaced with the current year at issue time (the sequence counter is continuous — {year} only stamps the year, it does not reset the counter each January). next_number may only move forward.



## OpenAPI

````yaml POST /invoices/settings
openapi: 3.0.0
info:
  title: Ebioro Merchant API
  description: >-
    API for merchant payment processing on Stellar. Supports direct USDC
    payments and cross-chain deposits from multiple blockchains.
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /invoices/settings:
    post:
      tags:
        - Invoices
      summary: Update invoice numbering settings
      description: >-
        Updates the invoice number prefix and/or the next number. The prefix
        supports a {year} token replaced with the current year at issue time
        (the sequence counter is continuous — {year} only stamps the year, it
        does not reset the counter each January). next_number may only move
        forward.
      operationId: InvoicesController_updateSettings
      parameters:
        - name: x-digest-timestamp
          in: header
          description: Current Unix timestamp
          required: true
          schema:
            type: string
        - name: x-digest-key
          in: header
          description: Your public api key
          required: true
          schema:
            type: string
        - name: x-digest-signature
          in: header
          description: Digest Auth Signature
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateInvoiceSettingsDto'
      responses:
        '200':
          description: Updated numbering settings.
          content:
            application/json:
              example:
                invoice_prefix: INV-{year}-
                next_number: 5
                preview: INV-2026-5
              schema:
                $ref: '#/components/schemas/InvoiceSettingsDto'
        '401':
          description: Authentication failed.
          content:
            application/json:
              example:
                reason: Signature verification failed
                statusCode: 401
        '404':
          description: Not found (or owned by another merchant).
          content:
            application/json:
              example:
                reason: Not found
                statusCode: 404
      security:
        - customHeader: []
components:
  schemas:
    UpdateInvoiceSettingsDto:
      type: object
      properties:
        invoice_prefix:
          type: string
          maxLength: 24
          example: INV-{year}-
          description: >-
            Prefix prepended to the sequence number. Supports a {year} token
            (e.g. "INV-{year}-" → INV-2026-1). Allowed characters: letters,
            numbers, space, - _ . / and the {year} token.
        next_number:
          type: integer
          minimum: 1
          example: 100
          description: >-
            The next invoice number to use. Must be >= the current next number
            (cannot move backward, so an already-used number is never reissued).
    InvoiceSettingsDto:
      type: object
      properties:
        invoice_prefix:
          type: string
          example: INV-{year}-
          description: Raw prefix template (may contain {year}).
        next_number:
          type: integer
          example: 5
          description: The number the next created invoice will use.
        preview:
          type: string
          example: INV-2026-5
          description: Preview of the next invoice number with {year} resolved.
  securitySchemes:
    customHeader:
      type: apiKey
      in: header
      name: x-digest-key
      description: Your public API key

````