Skip to main content
POST
/
my-account
/
subscriptions
/
{id}
/
on-hold
Suspend subscription
curl --request POST \
  --url {protocol}://{host}/wp-json/cocart/preview/my-account/subscriptions/{id}/on-hold \
  --header 'Authorization: Basic <encoded-value>'
{
  "subscription_id": 123,
  "subscription_status": "<string>",
  "requires_payment": true,
  "payment_processed": true,
  "payment_method": "<string>",
  "is_manual": "true",
  "payment_token": {
    "id": 123,
    "token": "<string>",
    "type": "cc",
    "gateway_id": "<string>",
    "is_default": true,
    "expires": "12/2025"
  },
  "available_tokens": [
    {
      "id": 123,
      "token": "<string>",
      "type": "cc",
      "gateway_id": "<string>",
      "is_default": true,
      "expires": "12/2025"
    }
  ],
  "can_use_token": true,
  "checkout_url": "<string>",
  "order_id": 123,
  "order_key": "<string>",
  "order_total": "<string>",
  "message": "<string>"
}
This endpoint is currently shown as a preview of what’s currently in development and is subject to change.
This endpoint supports only the official WooCommerce Subscriptions extension.

Authorizations

Authorization
string
header
required

WordPress username and password

Path Parameters

id
integer
required

Subscription ID

Response

Subscription suspended successfully

subscription_id
integer

Subscription ID

subscription_status
string

Current subscription status

requires_payment
boolean

Whether payment is required

payment_processed
boolean

Whether payment was processed

payment_method
string

Payment method display name

is_manual
enum<string>

Whether subscription is manual renewal

Available options:
true,
false
payment_token
object
available_tokens
object[]

Available payment tokens for the customer

can_use_token
boolean

Whether saved tokens can be used

checkout_url
string<uri>

Checkout API URL for payment

order_id
integer

Order ID requiring payment

order_key
string

Order key for payment

order_total
string

Order total amount

message
string

Action result message