openapi: 3.1.1
info:
  title: Invoice
  version: 2.1.0
  description: Schema definition for Invoice in the Beckn Protocol v2.0.1
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    Invoice:
      x-iri: https://schema.nfh.global/Invoice/v2.1
      description: Schema definition for Invoice in the Beckn Protocol v2.0.1
      title: Invoice
      type: object
      properties:
        dueDate:
          type:
          - string
          - 'null'
          x-jsonld:
            '@id': schema:paymentDueDate
          format: date
        id:
          description: Stable invoice identifier (system id)
          type: string
          x-jsonld:
            '@id': schema:identifier
        invoiceAttributes:
          description: Attribute Pack for tax regime (e.g., GST/VAT), e-invoice refs,
            legal boilerplate, etc.
          $ref: https://schema.nfh.global/Attributes/v2.0/attributes.yaml#/components/schemas/Attributes
        issueDate:
          type: string
          x-jsonld:
            '@id': schema:dateIssued
          format: date
        number:
          description: Human-visible invoice number
          type: string
          x-jsonld:
            '@id': schema:confirmationNumber
        payee:
          description: Seller / issuer of the invoice
          x-jsonld:
            '@id': schema:provider
          $ref: https://schema.nfh.global/Provider/v2.1/attributes.yaml#/components/schemas/Provider
        payer:
          description: consumer being invoiced
          x-jsonld:
            '@id': schema:customer
          $ref: https://schema.nfh.global/Consumer/v2.0/attributes.yaml#/components/schemas/Consumer
        costBreakup:
          type: array
          items:
            $ref: https://schema.nfh.global/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification
      required:
      - id
      - number
      - issueDate
      - payee
      - payer
      additionalProperties: false
      x-tags:
      - common
