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

# Mint Voucher

> Mints a new voucher with specified parameters.

This operation creates a voucher by allocating funds from a specified source account.
The voucher is assigned a unique identifier and can be redeemed before its expiration date.



## OpenAPI

````yaml service-openapi POST /v1/service/voucher
openapi: 3.0.0
info:
  title: Service API
  version: 0.0.0
servers:
  - url: https://api.nxos.io
    description: single server endpoint
    variables: {}
security: []
tags: []
paths:
  /v1/service/voucher:
    post:
      summary: Mint a new voucher
      description: >-
        Mints a new voucher with specified parameters.


        This operation creates a voucher by allocating funds from a specified
        source account.

        The voucher is assigned a unique identifier and can be redeemed before
        its expiration date.
      operationId: Vouchers_mintVoucher
      parameters: []
      requestBody:
        description: The details required to mint a new voucher.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MintVoucherRequest'
      responses:
        '200':
          description: The minted Voucher object containing all relevant details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Voucher'
components:
  schemas:
    MintVoucherRequest:
      type: object
      required:
        - value
        - provider_name
        - funding_source_account_id
      properties:
        value:
          allOf:
            - $ref: '#/components/schemas/PaymentValue'
          description: The value of the voucher to be minted.
        expires_at:
          type: string
          description: |-
            The expiration date of the voucher in ISO 8601 format.
            If not provided, a default expiration period may be applied.
        provider_name:
          type: string
          description: The name of the voucher provider or issuing system.
        funding_source_account_id:
          type: string
          description: The account ID from which funds will be sourced to back the voucher.
    Voucher:
      type: object
      required:
        - voucher_id
        - value
        - expires_at
        - provider_name
        - funding_source_account
        - status
      properties:
        voucher_id:
          type: string
          description: Unique identifier for the voucher.
        value:
          allOf:
            - $ref: '#/components/schemas/PaymentValue'
          description: The value of the voucher.
        expires_at:
          type: string
          description: The expiration date of the voucher in ISO 8601 format.
        provider_name:
          type: string
          description: The name of the voucher provider or issuing system.
        funding_source_account:
          type: string
          description: The account ID from which funds were sourced to back the voucher.
        status:
          allOf:
            - $ref: '#/components/schemas/VoucherStatus'
          description: The current status of the voucher.
    PaymentValue:
      type: object
      required:
        - amount
        - asset_code
      properties:
        amount:
          type: string
          description: >-
            The amount of the payment, in string representation. All amounts
            should be passed in full subunits, e.g. 1000 for 10.00
        asset_code:
          type: string
          description: >-
            The asset_code of the payment. The asset must've been created in the
            system before it can be used in payments
    VoucherStatus:
      type: string
      enum:
        - ACTIVE
        - PARTIALLY_REDEEMED
        - FULLY_REDEEMED
        - EXPIRED
        - CANCELLED

````