---
title: "Create Invoice"
method: POST
path: "/v3/invoice"
---

# Create Invoice

`POST /v3/invoice`

## Query parameters

- `echo` boolean

## Request body

- object
  - `merchantId` integer, required — The identification number of the merchant's account in the MX Merchant system.
  - `isClick2PayEnabled` boolean
  - `allowCreditCard` boolean — True means invoice can be paid with a credit card.
  - `status` string — Status of the invoice: Unpaid, Paid, Cancelled
  - `terms` string
  - `dueDate` string, date — Date the invoice is due to be paid.
  - `purchases` object[], required — Products purchased and taxes that apply.
    - `id` integer — Product ID.
    - `originalId` integer
    - `productName` string, required — Name of the purchased product.
    - `price` number, float, required — Price of the purchased product.
    - `quantity` integer, required — Quantity of purchased product.
    - `discount` integer — Discount applied to product.
    - `tax` integer
    - `totalAmount` number, float
  - `shippingAddress` object, required — Shipping address information.
    - `name` string — Name of address
    - `address1` string — Street address line 1.
    - `address2` string — Street address line 2.
    - `city` string — City of address.
    - `state` string — State of address.
    - `zip` string — Zip code of address.
    - `isDefault` boolean — True means this address is the default address for customer.
  - `billingAddress` object, required — Billing address information.
    - `name` string — Name of address
    - `address1` string — Street address line 1.
    - `address2` string — Street address line 2.
    - `city` string — City of address.
    - `state` string — State of address.
    - `zip` string — Zip code of address.
    - `isDefault` boolean — True means this address is the default address for customer.
  - `customer` object, required — Customer information.
    - `id` integer, required — Customer ID.
    - `customerType` string — Customer type may be "Person" or "Business".
    - `firstName` string — Customer's first name.
    - `lastName` string — Customer's last name.
    - `primaryContact` string — Primary contact information for the customer, this may be a phone number or an email address.
    - `email` string — Email address of customer.
    - `phone` string — Phone number of customer.
    - `mobile` string — Mobile number of customer.
  - `purchaseOrderNumber` string
  - `memo` string — A field where a memo can be contained.
  - `orderId` string
  - `order` object
    - `lineItems` object[]
      - `id` integer
      - `name` string
      - `price` number, float
      - `quantity` string
      - `discountAmount` integer
      - `tax` unknown[]
        - unknown
      - `totalAmount` integer
      - `taxCategory` object
        - `name` string
        - `code` string
        - `id` integer
        - `display` string
        - `taxes` object[]
          - `id` string — ID of tax.
          - `name` string — Name of tax.
          - `description` string — Description of tax.
          - `rate` number, double — Tax rate.
        - `taxRate` integer
        - `showTaxes` boolean
        - `noTaxes` boolean

## Response `200`

200

- object
  - `id` integer
  - `merchantId` integer
  - `type` string
  - `receiptNumber` string
  - `accessCode` string
  - `invoiceNumber` integer
  - `isTaxExempt` boolean
  - `quantity` string
  - `saleQuantity` string
  - `returnQuantity` string
  - `returnStatus` string
  - `netQuantity` string
  - `totalAmount` string
  - `taxAmount` string
  - `subTotalAmount` string
  - `discountAmount` string
  - `balance` string
  - `paidAmount` string
  - `dueDate` string
  - `created` string
  - `purchaseOrderNumber` string
  - `invoiceDate` string
  - `sourceType` string
  - `purchases` object[]
    - `id` integer
    - `productName` string
    - `quantity` integer
    - `quantityReturned` integer
    - `price` string
    - `discountAmount` string
    - `priceDiscountAmount` string
    - `subTotalAmount` string
    - `taxAmount` string
    - `totalAmount` string
    - `trackingNumber` integer
    - `created` string
    - `taxes` object[]
    - `discounts` object[]
    - `originalId` integer
  - `shippingLineItems` object[]
  - `discounts` object[]
  - `taxes` object[]
  - `customer` object
    - `id` integer
  - `billingAddress` object
    - `address1` string
    - `address2` string
    - `city` string
    - `state` string
    - `zip` string
  - `shippingAddress` object
    - `address1` string
    - `address2` string
    - `city` string
    - `state` string
    - `zip` string
  - `masterCardSecureCode` string
  - `status` string
  - `payments` object[]
  - `barCode` string
  - `allowCreditCard` boolean
  - `isShippingSameAsBilling` boolean
  - `orderId` integer
  - `legacy` boolean

## Other responses

- `400` — 400

---

[API](https://skmtc.net/mxmerchant/apis/checkout-api.md) · [All operations](https://skmtc.net/mxmerchant/apis/checkout-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mxmerchant/checkout-api/versions/6807b698abcb/schema)
