PayOrc
Subscription Plan

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

MethodURL
POSThttps://api.payorc.com/subscriptions/v1/deactivate

Please use the test credentials for sandbox testing.

Authentication

Include the following headers in every request:

HeaderTypeDescription
merchant-keyStringYour merchant key
merchant-secretStringYour merchant secret

All API requests must be made over HTTPS. Requests made over plain HTTP will be rejected.

Request Body

FieldTypeRequiredDescription
data_idStringYesEncrypted 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)

FieldTypeDescription
messageStringHuman-readable status message
statusStringsuccess or error
codeStringStatus 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.

On this page