---
title: "Create subscription"
method: POST
path: "/v1/subscriptions"
tags: ["Subscriptions"]
---

# Create subscription

`POST /v1/subscriptions`

## Request

- Base URL: `https://api.kyshi.co`
- URL: `https://api.kyshi.co/v1/subscriptions`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/kyshi/apis/kyshi-mor-public-api/docs/v1/subscriptions/post.ts> (a function with typed inputs; its response is checked against the schema)

Subscribes a customer to a plan. A new subscription is PENDING until the first charge settles: wait for subscription.active before granting access. Card subscriptions are charged automatically; bank_transfer, bank and mobile_money subscriptions are billed by invoice link each cycle.

## Headers

- `idempotency-key` string, required

## Request body

- CreateSubscriptionDto
  - `planCode` string, required
  - `customer` string, required
  - `card` string, required
  - `startDate` string, required
  - `paymentMethod` 'card' | 'mobile_money' | 'bank_transfer' | 'bank'
  - `redirectUrl` string
  - `invoiceLimit` number
  - `maxRetryCount` number
  - `gracePeriodDays` number

## Response `201`

Success.

- object
  - `status` boolean, required: `true` on success.
  - `message` string, required
  - `code` number, required: Mirrors the HTTP status code.
  - `data` object, required: The endpoint-specific payload.
    - `id` string, required
    - `status` string, required
    - `plan` PublicPlanDto
      - `id` string, required
      - `name` string, required
      - `amount` number, required
      - `currency` string, required
      - `interval` string
      - `isActive` boolean
      - `createdAt` string
    - `customer` object
    - `nextChargeAt` string
    - `createdAt` string

## Other responses

- `400`: Missing or invalid request parameter.
- `401`: No valid API key provided.
- `403`: The API key lacks permission for this request.
- `404`: Resource not found. A 404 on an object you just created is usually a test/live mode mismatch.
- `422`: Business rule failure, such as an unsupported currency or insufficient balance.
- `500`: Something went wrong on Kyshi’s end.

## Changes

- **2026-11-03** `4aed77604588`: 4 breaking, 4 warning, 9 info
  - the `header` request parameter `idempotency-key` became required
  - the request property `card` became required
  - the request property `startDate` became required
  - the response's body type changed from `object` to no type for status `201`
  - …13 more

[Operation history](https://skmtc.dev/kyshi/apis/kyshi-mor-public-api/changes/v1/subscriptions/post.md)

---

[API](https://skmtc.dev/kyshi/apis/kyshi-mor-public-api.md) - [All operations](https://skmtc.dev/kyshi/apis/kyshi-mor-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kyshi/apis/kyshi-mor-public-api/revisions/4aed77604588?raw)
