---
search:
  tags:
    - invoices
    - POST
seo:
  description: Reference for the POST /v1/invoices endpoint in the Vortex Payments API.
sidebar:
  label: POST /v1/invoices
  badge: POST
title: POST /v1/invoices
type: openapi-operation
---
`POST /v1/invoices`

**curl**

```bash
curl "https://api.vortex.nyc/v1/invoices?environment=sandbox&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customerId":"bcust_123","billingAccountId":"bacc_123","lineItems":[{"priceId":"price_core_monthly","quantity":1}]}'
```

**TypeScript**

```ts
import { createInvoice, createVortex } from "@vortex-api/vortex/2026-09";

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await createInvoice({
  client: vortex,
  query: { environment: "sandbox", merchantAccountId: "..." },
  body: {"customerId":"bcust_123","billingAccountId":"bacc_123","lineItems":[{"priceId":"price_core_monthly","quantity":1}]},
});
```

**Request body** (`application/json`, required)

- `environment` (string | null)
- `merchantAccountId` (string | null)
- `customerId` (string, required)
- `billingAccountId` (string, required)
- `lineItems` (object[], required)
- `invoiceId` (string | null)
- `asOf` (string | null)
- `metadata` (object | null)
- `couponId` (string | null)
- `tenantId` (string | null)
- `taxIdempotencyKey` (string | null)
- `customerTaxAddress` (object | null)
- `customerTaxIds` (object[] | null)
- `customerType` (string | null)
- `customerTaxExempt` (boolean | null)
- `customerTaxExemptionRef` (string | null)
- `fallbackOnProviderUnavailable` (boolean | null)
- `taxIdValidation` (string | null)
- `taxIdUnverifiableTreatment` (string | null)
- `shipFromAddress` (object | null)
- `taxBehavior` (string | null)
- `classificationKey` (string | null)

Request body example:

```json
{
  "environment": "sandbox",
  "merchantAccountId": "string",
  "customerId": "string",
  "billingAccountId": "string",
  "lineItems": [
    {
      "priceId": "string",
      "quantity": 0,
      "unitAmount": 0,
      "metadata": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "invoiceId": "string",
  "asOf": "string",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "couponId": "string",
  "tenantId": "string",
  "taxIdempotencyKey": "string",
  "customerTaxAddress": {
    "line1": "string",
    "city": "string",
    "region": "string",
    "postalCode": "string",
    "country": "string",
    "line2": "string"
  },
  "customerTaxIds": [
    {
      "type": "string",
      "value": "string"
    }
  ],
  "customerType": "consumer",
  "customerTaxExempt": true,
  "customerTaxExemptionRef": "string",
  "fallbackOnProviderUnavailable": true,
  "taxIdValidation": "full",
  "taxIdUnverifiableTreatment": "strict",
  "shipFromAddress": {
    "line1": "string",
    "city": "string",
    "region": "string",
    "postalCode": "string",
    "country": "string",
    "line2": "string"
  },
  "taxBehavior": "inclusive",
  "classificationKey": "string"
}
```

**Responses**

- `201` — Success

Response example, 201:

```json
{
  "data": {
    "invoice": {
      "invoiceId": "string",
      "customerId": "string",
      "billingAccountId": "string",
      "status": "draft",
      "currency": "string",
      "subtotal": 0,
      "discountTotal": 0,
      "taxTotal": 0,
      "total": 0,
      "amountPaid": 0,
      "amountRemaining": 0,
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "subscriptionId": "string",
      "creditNoteTotal": 0,
      "customerBalanceAppliedTotal": 0,
      "periodStartAt": "string",
      "periodEndAt": "string",
      "issuedAt": "string",
      "dueAt": "string",
      "finalizedAt": "string",
      "voidedAt": "string",
      "createdAt": "string",
      "updatedAt": "string"
    },
    "lines": [
      {
        "invoiceLineId": "string",
        "invoiceId": "string",
        "lineType": "fixed",
        "description": "string",
        "quantity": 0,
        "unitAmount": 0,
        "subtotal": 0,
        "priceSnapshot": {
          "property1": "string",
          "property2": "string"
        },
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "sortOrder": 0,
        "priceId": "string",
        "meterId": "string",
        "periodStartAt": "string",
        "periodEndAt": "string"
      }
    ]
  },
  "requestId": "string"
}
```
