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

**curl**

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

**TypeScript**

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

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

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

- `environment` (string | null)
- `merchantAccountId` (string | null)
- `customerId` (string, required)
- `billingAccountId` (string, required)
- `collectionMode` (string, required)
- `items` (object[], required)
- `subscriptionId` (string | null)
- `startAt` (string | null)
- `trialEndAt` (string | null)
- `initialStatus` (string | null)
- `testClockId` (string | null)
- `metadata` (object | null)

Request body example:

```json
{
  "environment": "sandbox",
  "merchantAccountId": "string",
  "customerId": "string",
  "billingAccountId": "string",
  "collectionMode": "manual",
  "items": [
    {
      "priceId": "string",
      "quantity": 0,
      "metadata": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "subscriptionId": "string",
  "startAt": "string",
  "trialEndAt": "string",
  "initialStatus": "draft",
  "testClockId": "string",
  "metadata": {
    "property1": "string",
    "property2": "string"
  }
}
```

**Responses**

- `201` — Success

Response example, 201:

```json
{
  "data": {
    "subscription": {
      "subscriptionId": "string",
      "customerId": "string",
      "billingAccountId": "string",
      "status": "draft",
      "collectionMode": "manual",
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "createdAt": "string",
      "currentPeriodStartAt": "string",
      "currentPeriodEndAt": "string",
      "trialEndAt": "string",
      "cancelAt": "string",
      "canceledAt": "string",
      "endedAt": "string",
      "testClockId": "string"
    },
    "items": [
      {
        "subscriptionItemId": "string",
        "subscriptionId": "string",
        "priceId": "string",
        "quantity": 0,
        "startAt": "string",
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "endAt": "string"
      }
    ]
  },
  "requestId": "string"
}
```
