Create Subscription
Creates a WooCommerce Subscriptions subscription for an existing customer to one subscription product, renewed manually: nothing is charged now and no payment method is stored, and on each renewal date WooCommerce Subscriptions creates a renewal order for the customer to pay. It is created "pending" (not running) unless status asks for "on-hold" or "active"; an active subscription starts creating renewal orders on its next payment date. The price and billing schedule come from the product. No email is sent unless notify is true. Reversible by cancelling it. Get the customer's user ID from mosmcp/wcsubs-list-subscriptions or the WooCommerce customer abilities, and a subscription product ID from the WooCommerce product abilities or mosmcp/wcsubs-create-subscription-product.
Also known as: add a subscription, sign someone up, manual subscription, subscribe a customer.
| Property | Value |
|---|---|
| Ability slug | mosmcp/wcsubs-create-subscription |
| Wire tool name | mosmcp__wcsubs-create-subscription |
| Category | WooCommerce Subscriptions (mosmcp-wc-subscriptions) |
| Plan | Pro |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_shop_orders |
| Minimum default role | Shop manager |
| Annotations | readOnly: false · destructive: false · idempotent: false · openWorld: true |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| customer_id | integer (min 1) | Yes | — | WordPress user ID of the customer who will own the subscription. |
| product_id | integer (min 1) | Yes | — | ID of a subscription product (or subscription variation) whose price and schedule the subscription takes. |
| quantity | integer (1–1000) | 1 |
How many of the product. Defaults to 1. | |
| status | string (one of pending, on-hold, active) |
pending |
Status to create it in. "pending" (the default) does nothing until someone activates it; "on-hold" is suspended; "active" starts the renewal schedule. Use "active" only when the person asked for the subscription to start. | |
| start_date | string | — | Optional start, YYYY-MM-DD HH:MM in the site's timezone. Defaults to now; cannot be in the future. | |
| next_payment | string | — | Optional first renewal date, YYYY-MM-DD HH:MM in the site's timezone, in the future. Defaults to one billing period after the start. | |
| note | string | — | Optional private note stored on the subscription for the shop staff. | |
| notify | boolean | false |
Let WooCommerce send the emails it normally sends for this change. Defaults to false: no email is sent. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| subscription | object | Yes | |
| subscription.subscription_id | integer | Yes | |
| subscription.number | string | The number shown to the customer, usually the ID. | |
| subscription.status | string | Yes | pending, active, on-hold, pending-cancel, cancelled, expired or switched. |
| subscription.status_label | string | ||
| subscription.customer_id | integer | Yes | |
| subscription.customer_name | string | ||
| subscription.customer_email | string | ||
| subscription.total | number | Recurring total charged each renewal, including tax and shipping. | |
| subscription.currency | string | ||
| subscription.billing_period | string | day, week, month or year. | |
| subscription.billing_interval | integer | ||
| subscription.schedule | string | The schedule in words, for example "every 3 months". | |
| subscription.start_date | string | Dates are in the site's timezone, empty when not set. | |
| subscription.trial_end | string | ||
| subscription.next_payment | string | ||
| subscription.end_date | string | When it ends or ended; empty means it runs until cancelled. | |
| subscription.payment_method | string | Payment method title, empty for manual renewal. | |
| subscription.manual_renewal | boolean | True when the customer pays each renewal order themselves rather than being charged automatically. | |
| subscription.parent_order_id | integer | The order whose checkout created it, or 0. | |
| subscription.edit_url | string | ||
| items | object[] | Yes | |
| items[].product_id | integer | Yes | |
| items[].variation_id | integer | ||
| items[].name | string | Yes | |
| items[].quantity | integer | Yes | |
| items[].total | number | ||
| renewal_order_count | integer | ||
| last_order_date | string | When its latest parent or renewal order was created, in the site's timezone. | |
| allowed_changes | object | ||
| allowed_changes.active | boolean | Whether it can be (re)activated now. | |
| allowed_changes.on_hold | boolean | Whether it can be suspended now. | |
| allowed_changes.cancel | boolean | Whether it can be cancelled now. | |
| allowed_changes.next_payment | boolean | Whether its next payment date can be changed. | |
| notes | string[] |
| << Previous | Next >> |
|---|---|
| Cancel Subscription | Create Subscription Product |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.