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

# Create Subscription Invoice

> Create an invoice for a subscription, or return the existing invoice with the same due date.



## OpenAPI

````yaml /openapi.yaml post /subscriptions/{subscriptionID}/invoices
openapi: 3.1.0
info:
  contact:
    email: support@boomfi.xyz
    name: API Support
  description: >-
    The BoomFi Merchants API provides a set of endpoints for merchants to manage
    their accounts, transactions, and more. Hosts differ per brand/environment;
    use the brand-specific base URL from the docs.
  title: BoomFi Merchants API
  version: '1.0'
servers:
  - url: https://mapi.boomfi.xyz/v1
    description: Production
  - url: https://mapi-test.boomfi.xyz/v1
    description: Test
security: []
tags:
  - description: Payment links
    name: Paylinks
  - description: Billing plans
    name: Plans
  - description: Subscriptions
    name: Subscriptions
  - description: Customer records
    name: Customers
  - description: Invoices
    name: Invoices
  - description: Payments
    name: Payments
  - description: Organisation events
    name: Events
  - description: Organisation profile and display settings
    name: Organisation
  - description: Webhook and request-signing secrets
    name: Secrets
  - description: Settlement accounts
    name: Accounts
  - name: External Accounts
  - description: Managed virtual accounts, balances, pay-in, and payout
    name: Virtual Accounts
  - description: Partner-managed accounts, virtual accounts, pay-in, and payout
    name: Partners
  - description: Partner maintain-balance automations
    name: Partner Balance Monitoring
  - name: Checkout Sessions
paths:
  /subscriptions/{subscriptionID}/invoices:
    post:
      tags:
        - Subscriptions
      summary: Create Subscription Invoice
      description: >-
        Create an invoice for a subscription, or return the existing invoice
        with the same due date.
      parameters:
        - description: Unique subscription identifier (sub_... or raw UUID)
          in: path
          name: subscriptionID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/subscriptions.CreateSubscriptionInvoice'
        description: Invoice request
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal.Response-models_Invoice'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal.ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    subscriptions.CreateSubscriptionInvoice:
      properties:
        due_date:
          description: Invoice due date (RFC3339).
          type: string
        properties:
          additionalProperties: {}
          description: Additional properties as a key-value map.
          type: object
        title:
          description: Invoice title or subject line.
          type: string
      type: object
    internal.Response-models_Invoice:
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/models.Invoice'
          description: Response payload when the request succeeded.
        error:
          description: True when the request failed.
          type: boolean
        message:
          description: Human-readable status or error message.
          type: string
      type: object
    internal.ErrorResponse:
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/internal.ErrorStruct'
          description: Error details including HTTP-style code and message.
      type: object
    models.Invoice:
      properties:
        amount:
          description: amount
          type: string
        created_at:
          description: created_at
          type: string
        currency:
          description: currency
          type: string
        customer_id:
          description: customer_id
          type: string
        due_at:
          description: due_at
          type: string
        dunning_status:
          allOf:
            - $ref: '#/components/schemas/docenums.DunningStatus'
          description: dunning_status
        id:
          description: id
          type: string
        issuing_at:
          description: issuing_at
          type: string
        org_id:
          description: org_id
          type: string
        payment_status:
          allOf:
            - $ref: '#/components/schemas/docenums.PaymentStatus'
          description: payment_status
        properties:
          description: properties
          items:
            type: integer
          type: array
        reference:
          description: reference
          type: string
        source:
          allOf:
            - $ref: '#/components/schemas/docenums.BillingSource'
          description: source
        status:
          allOf:
            - $ref: '#/components/schemas/docenums.InvoiceStatus'
          description: status
        updated_at:
          description: updated_at
          type: string
      type: object
    internal.ErrorStruct:
      properties:
        code:
          description: |-
            Error code
            Example: 400
          example: 400
          type: integer
        errors:
          description: List of errors
          items:
            $ref: '#/components/schemas/internal.SingleError'
          type: array
        message:
          description: |-
            Error message
            Example: Insufficient quantity
          example: Insufficient quantity
          type: string
      type: object
    docenums.DunningStatus:
      enum:
        - Unknown
        - InProgress
        - Exhausted
        - Stopped
        - Succeeded
      type: string
      x-enum-varnames:
        - DunningStatusUnknown
        - DunningStatusInProgress
        - DunningStatusExhausted
        - DunningStatusStopped
        - DunningStatusSucceeded
    docenums.PaymentStatus:
      enum:
        - Unknown
        - RequiresPaymentMethod
        - RequiresConfirmation
        - RequiresAction
        - Processing
        - Succeeded
        - Canceled
        - Failed
      type: string
      x-enum-varnames:
        - PaymentStatusUnknown
        - PaymentStatusRequiresPaymentMethod
        - PaymentStatusRequiresConfirmation
        - PaymentStatusRequiresAction
        - PaymentStatusProcessing
        - PaymentStatusSucceeded
        - PaymentStatusCanceled
        - PaymentStatusFailed
    docenums.BillingSource:
      enum:
        - Lago
        - BoomFi
        - Stripe
        - Chargebee
        - QuickBooks
      type: string
      x-enum-varnames:
        - BillingSourceLago
        - BillingSourceBoomFi
        - BillingSourceStripe
        - BillingSourceChargebee
        - BillingSourceQuickBooks
    docenums.InvoiceStatus:
      enum:
        - Unknown
        - Draft
        - Open
        - Paid
        - Void
        - Uncollectible
      type: string
      x-enum-varnames:
        - InvoiceStatusUnknown
        - InvoiceStatusDraft
        - InvoiceStatusOpen
        - InvoiceStatusPaid
        - InvoiceStatusVoid
        - InvoiceStatusUncollectible
    internal.SingleError:
      properties:
        domain:
          description: |-
            Domain
            Example: orders
          example: orders
          type: string
        reason:
          description: |-
            Error Reason
            Example: InsufficientQuantity
          example: InsufficientQuantity
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-API-KEY
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.