Skip to content

CreateCustomSubscription

Type: schema

TypeScript Definition

typescript
CreateCustomSubscription: {{
            /** @constant */
            readonly plan_type: "custom";
            /** Format: date */
            start_date?: string;
            /**
             * Format: date
             * @description if specified, subscrition will be revoked on this date.
             */
            end_date?: string | null;
            /** @enum {unknown} */
            billing_frequency: "monthly";
            /**
             * @description Frequency unit multiplier. For example, `1` with `monthly` means every month; `3` with `weekly` means in every 3 weeks.
             * @default 1
             */
            billing_interval: number;
            billing_limit: number | null;
            /** @enum {unknown} */
            shipping_frequency?: "monthly";
            /**
             * @description Frequency unit multiplier. For example, `1` with `monthly` means every month; `3` with `weekly` means in every 3 weeks.
             * @default 1
             */
            shipping_interval: number | null;
            shipping_limit?: number | null;
            coupon_code?: string | null;
        };
        /** CreateOrderReturn */
}

OpenAPI Schema

json
{
  "title": "CreateCustomSubscription",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/CreateCustomSubscription",
    "description": "API reference for the CreateCustomSubscription schema"
  },
  "required": [
    "plan_type",
    "billing_frequency",
    "billing_interval",
    "billing_limit"
  ],
  "properties": {
    "plan_type": {
      "type": "string",
      "const": "custom",
      "readOnly": true
    },
    "start_date": {
      "type": "string",
      "format": "date"
    },
    "end_date": {
      "description": "if specified, subscrition will be revoked on this date.",
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "billing_frequency": {
      "enum": [
        "monthly"
      ]
    },
    "billing_interval": {
      "description": "Frequency unit multiplier. For example, `1` with `monthly` means every month; `3` with `weekly` means in every 3 weeks.",
      "type": "integer",
      "default": 1
    },
    "billing_limit": {
      "type": [
        "integer",
        "null"
      ]
    },
    "shipping_frequency": {
      "enum": [
        "monthly"
      ]
    },
    "shipping_interval": {
      "description": "Frequency unit multiplier. For example, `1` with `monthly` means every month; `3` with `weekly` means in every 3 weeks.",
      "type": [
        "integer",
        "null"
      ],
      "default": 1
    },
    "shipping_limit": {
      "type": [
        "integer",
        "null"
      ]
    },
    "coupon_code": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "x-tags": [
    "Subscriptions"
  ]
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: