Update Subscription Plan
Update an existing subscription plan's details including billing frequency, installment amounts, terms, and scheduling.
Update Subscription Plan
Version: 3.0.0
Generate an API Key for the Subscription channel before making requests.
Use this endpoint to update an existing subscription plan. You can modify the plan name, description, billing frequency, installment amounts, terms, payment amounts, fees, and scheduling. You must provide the data_id of the plan to update.
Endpoint
| Method | URL |
|---|---|
| POST | https://api.payorc.com/subscriptions/v1/update |
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
Send the full plan configuration. Use the encrypted data_id from Plan List or the create-plan response.
| Field | Type | Required | Description |
|---|---|---|---|
data_id | String | Yes | Encrypted plan identifier from Plan List or create-plan response. |
plan_name | String | Yes | Updated plan name. Max 50 characters. |
plan_description | String | No | Plan description. Max 250 characters. |
billing_frequency | Object | Yes | Billing frequency object (same shape as create-plan). |
billing_frequency.frequency | String | Yes | daily, weekly, monthly, or yearly. |
billing_frequency.interval | Number | Yes | Billing interval. Min 1. |
installment_amount | Object | Yes | Installment amount object. |
installment_amount.currency | String | Yes | 3-letter currency code enabled on your account. |
installment_amount.value | Number | Yes | Installment amount. Min 1. |
terms | Object | Yes | Plan terms (same rules as create-plan). |
terms.unlimited | String | Yes | yes or no. |
terms.value | Number | Conditional | Required when terms.unlimited is no (1–1999). |
terms.discount_term | Number | No | Discount term number. Required with discount_amount when used. |
terms.discount_amount | Number | No | Discount amount for the specified term. |
initial_payment_amount | Number | Yes | Initial payment. Min 1. Cannot exceed installment amount. |
final_payment_amount | Number | Yes | Final payment. Min 1. When terms.unlimited is yes, must equal installment amount. |
shipping_fee | Number | Yes | Shipping fee. Min 0. |
convenience_fee | Number | Yes | Convenience fee. Min 0. |
start_date | String | Yes | Effective date. Format: YYYY-MM-DD HH:mm. Today or future. |
expiry_date | String | No | Expiry date. Format: YYYY-MM-DD HH:mm. Must be after start_date. |
note | String | No | Note. Max 250 characters. |
The plan must exist, not be expired, and must be Active (not deactivated) to update. Expired or deactivated plans must be reactivated or recreated first.
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/update \
-H "Content-Type: application/json" \
-H "merchant-key: YOUR_MERCHANT_KEY" \
-H "merchant-secret: YOUR_MERCHANT_SECRET" \
-d '{
"data_id": "UUg4VUdOV0Voej",
"plan_name": "Shree ram yatra",
"plan_description": "pratishtha",
"billing_frequency": {
"frequency": "daily",
"interval": 2
},
"installment_amount": {
"currency": "AED",
"value": 300
},
"terms": {
"unlimited": "no",
"value": 20,
"discount_term": 5,
"discount_amount": 90
},
"initial_payment_amount": 109,
"final_payment_amount": 80,
"shipping_fee": 20,
"convenience_fee": 10,
"start_date": "2027-01-15 10:00",
"expiry_date": "2027-06-15 23:59",
"note": ""
}'Example Response
{
"message": "Subscription plan updated successfully.",
"status": "success",
"code": "00"
}Update vs deactivate: Only Active plans can be updated. Deactivated plans must be activated first via the Activate endpoint.