Documentation is still being updated. Some content maybe unfinished.
A valid request URL is required to generate request examples{
"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>"
}Enable or disable automatic renewal for a subscription
curl --request POST \
--url {protocol}://{host}/wp-json/cocart/preview/my-account/subscriptions/{id}/renew-{action} \
--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>"
}WordPress username and password
Subscription ID
Action to perform (enable or disable)
enable, disable Auto-renewal toggled successfully
Subscription ID
Current subscription status
Whether payment is required
Whether payment was processed
Payment method display name
Whether subscription is manual renewal
true, false Show child attributes
Available payment tokens for the customer
Show child attributes
Whether saved tokens can be used
Checkout API URL for payment
Order ID requiring payment
Order key for payment
Order total amount
Action result message
Was this page helpful?