set_subscription_definition
Report whether the app sells an in-app subscription, and describe every plan it sells. Send { appId, enabled: false } when the project has no paywall. Send { appId, enabled: true, iosSdkKey } as soon as you know the app sells one — the purchase plugin and that key are compiled into the native build. When the app sells more than one plan (for example monthly and annual), send them all in the products array — never describe an extra plan in reviewNotes, it will not be created. A single plan may also be sent with the flat productId/displayName/description/duration/price fields. Read the real paywall code — do not invent a price or a product id. Duration must be ONE_WEEK, ONE_MONTH, TWO_MONTHS, THREE_MONTHS, SIX_MONTHS or ONE_YEAR, and each plan needs its own product id and duration. The display name is limited to 30 characters and the description to 45, because that is what the App Store purchase sheet shows.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"appId": "<appId>"
},
"name": "set_subscription_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | ||
| price | No | Plain number in the base currency, e.g. 3.99 | |
| enabled | No | Whether the app sells an in-app subscription at all. Send false when the project has no paywall. | |
| duration | No | ONE_WEEK, ONE_MONTH, TWO_MONTHS, THREE_MONTHS, SIX_MONTHS or ONE_YEAR | |
| products | No | Every plan the app sells. Each entry has its own productId, displayName, description, duration, price and optional freeTrialDays/reviewNotes. | |
| iosSdkKey | No | RevenueCat iOS public SDK key found in the project, starts with appl_ | |
| productId | No | App Store product id, e.g. app.myapp.diy.premium.monthly | |
| description | No | One line on the purchase sheet, 45 characters max | |
| displayName | No | Plan name on the purchase sheet, 30 characters max | |
| reviewNotes | No | Note for the App Store reviewer about the subscription | |
| androidSdkKey | No | RevenueCat Android public SDK key found in the project, starts with goog_ | |
| freeTrialDays | No | Free trial length in days, omit or 0 for none | |
| reviewScreenshotUrl | No | Public https URL of a paywall screenshot Apple requires against the product. Never invent one. |