> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-60c89f9a-mintlify-audit-missing-sections-1778528421.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an invoice

> Creates a new invoice to bill a customer for products or services.



## OpenAPI

````yaml /openapi/products.json post /invoices
openapi: 3.1.0
info:
  title: Razorpay Products API
  description: >-
    API specification for Razorpay Payment Links, Subscriptions, and QR Codes
    products.
  version: 1.0.0
  contact:
    name: Razorpay Support
    url: https://razorpay.com/support
servers:
  - url: https://api.razorpay.com/v1
    description: Razorpay Production API
security:
  - basicAuth: []
tags:
  - name: Payment Links
    description: >-
      Create and manage payment links to collect payments from customers without
      building a checkout flow.
  - name: Plans
    description: >-
      Create and manage plans that define the billing period and amount for
      subscriptions.
  - name: Subscriptions
    description: >-
      Create and manage recurring subscriptions for customers based on defined
      plans.
  - name: QR Codes
    description: Create and manage QR codes for accepting UPI payments in-store or online.
  - name: Invoices
    description: Create and manage invoices to bill customers for products and services.
paths:
  /invoices:
    post:
      tags:
        - Invoices
      summary: Create an invoice
      description: Creates a new invoice to bill a customer for products or services.
      operationId: createInvoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - customer
                - line_items
              properties:
                type:
                  type: string
                  description: Type of invoice. Use `invoice` for regular invoices.
                  enum:
                    - invoice
                    - link
                  example: invoice
                description:
                  type: string
                  description: Description of the invoice.
                  example: Invoice for Q1 services
                customer:
                  type: object
                  description: Customer details for the invoice.
                  properties:
                    name:
                      type: string
                      example: Gaurav Kumar
                    email:
                      type: string
                      example: gaurav.kumar@example.com
                    contact:
                      type: string
                      example: '+919876543210'
                line_items:
                  type: array
                  description: List of items in the invoice.
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Name of the item.
                        example: Consulting Services
                      amount:
                        type: integer
                        description: Amount in smallest currency unit (paise).
                        example: 100000
                      quantity:
                        type: integer
                        description: Quantity of the item.
                        example: 1
                currency:
                  type: string
                  description: Currency code (ISO 4217).
                  default: INR
                  example: INR
      responses:
        '200':
          description: Invoice created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: inv_FgR9UMzgmKDJRi
                  entity:
                    type: string
                    example: invoice
                  status:
                    type: string
                    example: issued
                  short_url:
                    type: string
                    example: https://rzp.io/i/w2CEwYmkAu
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your Razorpay Key ID as the username and Key Secret as the password.

````