PayOrc
Subscription Plan

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

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

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

Send the full plan configuration. Use the encrypted data_id from Plan List or the create-plan response.

FieldTypeRequiredDescription
data_idStringYesEncrypted plan identifier from Plan List or create-plan response.
plan_nameStringYesUpdated plan name. Max 50 characters.
plan_descriptionStringNoPlan description. Max 250 characters.
billing_frequencyObjectYesBilling frequency object (same shape as create-plan).
billing_frequency.frequencyStringYesdaily, weekly, monthly, or yearly.
billing_frequency.intervalNumberYesBilling interval. Min 1.
installment_amountObjectYesInstallment amount object.
installment_amount.currencyStringYes3-letter currency code enabled on your account.
installment_amount.valueNumberYesInstallment amount. Min 1.
termsObjectYesPlan terms (same rules as create-plan).
terms.unlimitedStringYesyes or no.
terms.valueNumberConditionalRequired when terms.unlimited is no (1–1999).
terms.discount_termNumberNoDiscount term number. Required with discount_amount when used.
terms.discount_amountNumberNoDiscount amount for the specified term.
initial_payment_amountNumberYesInitial payment. Min 1. Cannot exceed installment amount.
final_payment_amountNumberYesFinal payment. Min 1. When terms.unlimited is yes, must equal installment amount.
shipping_feeNumberYesShipping fee. Min 0.
convenience_feeNumberYesConvenience fee. Min 0.
start_dateStringYesEffective date. Format: YYYY-MM-DD HH:mm. Today or future.
expiry_dateStringNoExpiry date. Format: YYYY-MM-DD HH:mm. Must be after start_date.
noteStringNoNote. 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)

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

On this page