Skip to main content

UpdateSubscriptionPlans

Replaces the plan set of an existing subscription service. Only the service provider may update plans.

Request

POST /nxt?requestType=updateSubscriptionPlans

All endpoints use port 22024 by default.

Parameters

NameTypeDescriptionRequired
serviceIdstringSubscription service IDYes
plansstringJSON array of plan objectsYes
secretPhrasestringProvider's secret passphraseYes

Plan Object Format

Same as CreateSubscriptionService — each plan object must contain plan, description, duration, amountQNT, and optional metadata.

Response

{
"transaction": "1234567890123456789",
"fullHash": "abc123def456...",
"errorCode": 0,
"errorDescription": ""
}

Example

curl -X POST "http://localhost:22024/nxt?requestType=updateSubscriptionPlans" \
-d "serviceId=9876543210123456789" \
-d "plans=[{\"plan\":\"Basic\",\"description\":\"Basic plan\",\"duration\":30,\"amountQNT\":\"100000000\"}]" \
-d "secretPhrase=your_secret_passphrase"