Deactivate Subscription Plan
Deactivate an existing subscription plan to prevent new customer subscriptions.
Deactivate Subscription Plan
Version: 3.0.0
Generate an API Key for the Subscription channel before making requests.
Use this endpoint to deactivate a subscription plan. Deactivated plans cannot be assigned to new customers, but existing subscribers on the plan will continue to be billed according to their subscription terms.
Endpoint
| Method | URL |
|---|---|
| POST | https://api.payorc.com/subscriptions/v1/deactivate |
Please use the test credentials for sandbox testing.
Authentication
Include the following headers in every request:
| Header | Type | Description |
|---|---|---|
merchant-key | String | Your merchant key |
merchant-secret | String | Your merchant secret |
All API requests must be made over HTTPS. Requests made over plain HTTP will be rejected.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
data_id | String | Yes | Encrypted plan identifier from Plan List or create-plan response. The plan must currently be Active and not expired. |
Obtain data_id from the Plan List endpoint (data[].data_id). Do not use the plain plan_id display value here.
Response (200 OK)
| Field | Type | Description |
|---|---|---|
message | String | Human-readable status message |
status | String | success or error |
code | String | Status code (00 for success) |
Code Examples
curl -X POST https://api.payorc.com/subscriptions/v1/deactivate \
-H "Content-Type: application/json" \
-H "merchant-key: YOUR_MERCHANT_KEY" \
-H "merchant-secret: YOUR_MERCHANT_SECRET" \
-d '{
"data_id": "ak80VjZGeURhT2hSM"
}'Example Response
{
"message": "Subscription plan deactivated successfully.",
"status": "success",
"code": "00"
}Deactivating a plan does not cancel existing subscriptions. Active subscribers will continue to be billed. To stop billing, you must cancel each subscription individually using the Cancel Subscription endpoint.