---
title: "Create subscription"
method: POST
path: "/api/v1.4/subscriptions/"
tags: ["v1.1"]
---

# Create subscription

`POST /api/v1.4/subscriptions/`

Create subscription

## Request body

- CreateSubscription
  - `plan` string, required — Plan ID to attach subscription to.
  - `start_date` string, date, required — Start date of subscription trial or subscription first cycle.
  - `customer` string, uuid, required — Customer UUID to be attached to the subscription.
  - `charge_automatically` boolean — Determine if the subscription invoice will be charged automatically using card token.
  - `primary_card_token` string, uuid — Card token uuid that will be used in paying subscription invoice automatically. Required only when set charge_automatically = true
  - `customization` CreateSubscriptionCustomization
    - `amount` string, decimal — Override Plan's base amount that used in subscription invoices.
    - `one_time_fee` string, decimal, nullable — Override One time fee will be added once to the first subscription invoice when subscripting to this plan.
    - `trial_period` integer, nullable — Override Number of trial units prior to the first recurring cycle.
    - `recurrency` integer — Override Number of recurrency unit between recurring cycles pay.
    - `recurring_cycles` integer, nullable — Override Number of recurring cycles in the subscription life time.
    - `discount_amount` string, decimal — Override Discount amount applied.
    - `discount_percentage` string, decimal — Override Discount percentage applied.
    - `discount_cycles` integer — Override How many cycles the discount will be applied to.
  - `webhook_url` string, uri — A URL that the Moneyhash server will send a POST request to with subscription status updates.
  - `custom_fields` unknown
  - `flow_id` string, nullable — ID of the payment flow to be used with the subscription invoice payments.

## Response `200`

- SubscriptionDetails
  - `id` string, required
  - `account` object, required
  - `plan` object, required — Plan ID subscription attached to.
  - `current_status` object, required — Subscription current status.
  - `statuses` unknown[], required — Subscription status history.
    - unknown
  - `start_date` string, date — Start date of subscription trial or subscription first cycle.
  - `customer` object, required — Customer UUID attached to the subscription.
  - `charge_automatically` boolean — Determine if the subscription invoice will be charged automatically using card token.
  - `primary_card_token` string, nullable, required
  - `remaining_recurring_cycles` integer, nullable — Number of remaining recurring cycles in the subscription life time, null if the subscription is forever.
  - `remaining_discount_cycles` integer, nullable — Number of recurring cycles to apply discount to, null if there is no discount.
  - `configuration` object, required — Subscription configuration attached to subscription.
  - `webhook_url` string, uri, nullable — A URL that the Moneyhash server will send a POST request to with subscription status updates.
  - `custom_fields` unknown
  - `due_invoices` object[], required — Due invoices to be paid.
  - `next_recurring_cycle_invoice` object, required — Start date of the next recurring cycle, null if the current date less than start date
  - `all_invoices` object, required — All invoices related to this subscription.
  - `is_live` boolean, required
  - `end_date` string, required
  - `created` string, date-time, required
  - `transactions` unknown[], required — All transactions created when invoices paid.
    - unknown
  - `scheduled_updates` unknown[], required — Subscription updates to be done.
    - unknown
  - `proration_credit_notes` unknown[], required — Credit notes from proration downgrades.
    - unknown
  - `payment_redirects` object, nullable, required — Payment redirect URLs from plan group level.
  - `flow` object, nullable, required — The data of the payment flow attached to the subscription if exists.
  - `card_tokenization_payment_intent` object, nullable, required — The subscription payment intent that is used for card tokenization when charge_automatically is true and primary_card_token is not provided in the subscription creation

## Other responses

- `400`
- `401`

---

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