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

# Create an invoice

> Creates an invoice with line items, due date, and payment terms. Deliver it to the customer with **Send an invoice**.



## OpenAPI

````yaml /openapi.json post /v1/invoices
openapi: 3.0.0
info:
  title: Jupico - OpenAPI 3.0
  description: >-
    The Jupico API lets Service Providers onboard merchants, process card and
    eCheck (ACH) payments, run hosted payment pages, manage recurring billing,
    send payouts, and query every resource. All endpoints use HTTPS with Basic
    authentication and accept and return JSON. Endpoints are grouped by
    workflow: onboard merchants first, then accept payments, then move funds and
    report.
  termsOfService: https://help.jupico.com/references-and-resources/legal
  contact:
    email: support@jupico.com
  license:
    name: Jupico License
    url: https://jupico.com
  version: 1.0.5
servers:
  - url: https://sandbox-platform.jupico.com
security:
  - basicAuth: []
tags:
  - name: Status
    description: Health check for the Jupico API.
  - name: Onboarding Invites
    description: >-
      Create and send invites that onboard merchants through the Jupico-hosted
      flow, with optional pre-filled identity, fees, and payout bank account
      data.
  - name: Provisioning
    description: >-
      Onboard merchants from your own UI. Collect onboarding data and submit it
      through the provisioning chain: applicant → application → submerchant.
  - name: Session
    description: >-
      Create browser authorization sessions for the Jupico web components, so
      card and bank account data is tokenized client-side and never touches your
      servers.
  - name: Tokenization
    description: >-
      Convert one-time tokens from the web components into permanent Jupico
      tokens, or tokenize raw card data if your systems are PCI DSS compliant.
  - name: Customer
    description: >-
      Create and manage customer records that payments, subscriptions,
      installments, and invoices link to.
  - name: Card Transactions
    description: >-
      Process credit and debit card transactions using tokenized card data:
      sale, authorization, capture, void, refund, and rollback.
  - name: eCheck Transactions
    description: >-
      Debit customer bank accounts via eCheck (ACH): sale, void, refund,
      rollback, and bank account tokenization.
  - name: Checkouts
    description: >-
      Hosted checkout sessions where customers complete payment on a
      Jupico-hosted page.
  - name: Payment Links
    description: >-
      Shareable links that open a Jupico-hosted payment page — no integration
      code needed at the point of sharing.
  - name: Invoices
    description: Create and email invoices that customers pay online.
  - name: Subscriptions
    description: >-
      Recurring billing. Plans define billing schedules and pricing models;
      subscriptions enroll customers against a stored payment token.
  - name: Installments
    description: Split a fixed total into scheduled payments with an optional deposit.
  - name: Payouts
    description: >-
      Send funds from a submerchant's available balance to a tokenized bank
      account with on-demand payout instructions.
  - name: Query
    description: >-
      Search and report across every resource: transactions, merchants,
      settlements, balances, disputes, fees, and more. All query endpoints
      accept the same filter, sort, and pagination envelope — see the Query
      Capabilities guide.
paths:
  /v1/invoices:
    post:
      tags:
        - Invoices
      summary: Create an invoice
      description: >-
        Creates an invoice with line items, due date, and payment terms. Deliver
        it to the customer with **Send an invoice**.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subMerchantId:
                  type: string
                  description: The subMerchantId associated with the invoice.
                customerId:
                  type: string
                  description: The customer id of the invoice.
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        example: Consulting services
                        description: Description of the line item.
                      quantity:
                        type: number
                        example: 5
                        description: Number of units.
                      amount:
                        type: number
                        example: 100
                        description: Price per unit.
                      taxRate:
                        type: number
                        description: Tax rate applied to this line item, as a percentage.
                  description: Line items included in the total amount.
                totalAmount:
                  type: number
                  example: 500
                  description: The total amount of the invoice.
                date:
                  type: string
                  example: '2023-12-10T20:02:20.454Z'
                  description: The invoice date.
                dueDate:
                  type: string
                  example: '2023-12-10T20:02:20.454Z'
                  description: The invoice dueDate.
                paymentTerm:
                  type: string
                  example: Due Upon Receipt
                  description: The invoice paymentTerm.
                hostedSession:
                  type: object
                  description: Configuration for the hosted payment page.
              required:
                - subMerchantId
                - customerId
                - items
                - totalAmount
                - date
                - dueDate
                - paymentTerm
            example:
              simulatorExample:
                summary: Simulator example
                value:
                  customerId: 65f7ee397a4bb65ed744b6f4
                  date: '2023-12-10T20:02:20.454Z'
                  dueDate: '2023-12-10T20:02:20.454Z'
                  paymentTerm: Due Upon Receipt
                  subMerchantId: tpf-sim-beauty
                  description: desc
                  items:
                    - description: hamburguer
                      quantity: 1
                      amount: 10
                      taxRate: 10
                  totalAmount: 11
                  hostedSession:
                    enabled: true
                    paymentMethods:
                      defaultMethod: creditCard
                      creditCard:
                        enabled: true
                      eCheck:
                        enabled: false
                      applePay:
                        enabled: false
                      googlePay:
                        enabled: false
                    flow:
                      type: redirect
                      redirect:
                        successUrl: >-
                          http://local-payments-platform.jupiterhq.com/v1/paymentlinks/successUrl
                        cancelUrl: >-
                          http://local-payments-platform.jupiterhq.com/v1/paymentlinks/cancelUrl
                        backUrl: >-
                          http://local-payments-platform.jupiterhq.com/v1/paymentlinks/backUrl
                    functions:
                      collectBillingAddress:
                        enabled: false
                      collectShippingAddress:
                        enabled: false
                      collectPhoneNumber:
                        enabled: false
                      callToAction:
                        enabled: true
                        label: Pay
                        note: more
                      notes:
                        enabled: true
                      collectEmail:
                        enabled: true
                        updateCustomer: true
                    constraints:
                      timeLimit: 1000
                      geoLocation: location
                      browserInfo: browser
              CybersourceExample:
                summary: Cybersource example
                value:
                  customerId: 65f7ee397a4bb65ed744b6f4
                  date: '2023-12-10T20:02:20.454Z'
                  dueDate: '2023-12-10T20:02:20.454Z'
                  paymentTerm: Due Upon Receipt
                  subMerchantId: tpf-sim-beauty
                  description: desc
                  items:
                    - description: hamburguer
                      quantity: 1
                      amount: 10
                      taxRate: 10
                  totalAmount: 11
                  hostedSession:
                    enabled: true
                    paymentMethods:
                      defaultMethod: creditCard
                      creditCard:
                        enabled: true
                      eCheck:
                        enabled: false
                      applePay:
                        enabled: false
                      googlePay:
                        enabled: false
                    flow:
                      type: redirect
                      redirect:
                        successUrl: >-
                          http://local-payments-platform.jupiterhq.com/v1/paymentlinks/successUrl
                        cancelUrl: >-
                          http://local-payments-platform.jupiterhq.com/v1/paymentlinks/cancelUrl
                        backUrl: >-
                          http://local-payments-platform.jupiterhq.com/v1/paymentlinks/backUrl
                    functions:
                      collectBillingAddress:
                        enabled: false
                      collectShippingAddress:
                        enabled: false
                      collectPhoneNumber:
                        enabled: false
                      callToAction:
                        enabled: true
                        label: Pay
                        note: more
                      notes:
                        enabled: true
                      collectEmail:
                        enabled: true
                        updateCustomer: true
                    constraints:
                      timeLimit: 1000
                      geoLocation: location
                      browserInfo: browser
      responses:
        '201':
          description: Invoice successfully created.
        '400':
          description: Bad Request. Invalid input.
        '401':
          description: Unauthorized.
        '500':
          description: Internal Server Error.
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````