Edit exist plan, amount|currency|intervalUnit|intervalCount is not editable when plan is active
https://api.unibee.dev/merchant/plan/edit
Edit exist plan, amount|currency|intervalUnit|intervalCount is not editable when plan is active
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <your_api_key> |
Content-Type | Yes | application/json (for request body) |
| Name | Type | Required | Description |
|---|---|---|---|
addonIds | array | No | Plan Ids Of Recurring Addon Type |
amount | integer | No | CaptureAmount of plan, not editable when plan is active |
cancelAtTrialEnd | integer | No | whether cancel at subscription first trial end,0-false | 1-true, will pass to cancelAtPeriodEnd of subscription |
currency | string | No | Currency of plan, not editable when plan is active |
description | string | No | Description of plan |
externalPlanId | string | No | ExternalPlanId |
gasPayer | string | No | who pay the gas for crypto payment, merchant|user |
homeUrl | string | No | HomeUrl,Start With: http |
imageUrl | string | No | ImageUrl,Start With: http |
internalName | string | No | |
intervalCount | integer | No | Number,intervalUnit of plan, not editable when plan is active |
intervalUnit | string | No | Interval unit of plan,em: day|month|year|week, not editable when plan is active |
metadata | object | No | Metadata,Map |
metricLimits | array | No | Plan’s MetricLimit List, nil means no change, empty array means delete all, array with data means full replace |
metricMeteredCharge | array | No | Plan’s MetricMeteredCharge |
metricRecurringCharge | array | No | Plan’s MetricRecurringCharge |
multiCurrencies | array | No | Plan’s MultiCurrencies |
onetimeAddonIds | array | No | Plan Ids Of Onetime Addon Type |
planId | integer | Yes | Id of plan |
planName | string | No | Name of plan |
productDescription | string | No | ProductDescription of plan, Default copy description |
productId | integer | No | Id of product which plan to linked |
productName | string | No | ProductName of plan, Default copy planName |
trialAmount | integer | No | price of trial period, not available for addon |
trialDemand | string | No | demand of trial, not available for addon, example, paymentMethod, payment method will ask for subscription trial start |
trialDurationTime | integer | No | duration of trial,seconds, not available for addon |
usVATConfig | string | No |
code, data, message, redirect, and requestId. code 0 indicates success.
| Field | Type | Description |
|---|---|---|
code | integer | Response code. 0 = success |
data | object | Response payload |
data.plan | object | |
message | string | Human-readable message |
requestId | string | Request ID for support |
| HTTP status | Meaning |
|---|---|
| 400 | Bad request — invalid or missing parameters. Check message in the body. |
| 401 | Unauthorized — missing or invalid API key. |
| 404 | Not found — invalid path or resource. |
| 500 | Server error — retry with backoff. |
code in the response body is non-zero, check message for details. Use requestId when contacting support.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Edit exist plan, amount|currency|intervalUnit|intervalCount is not editable when plan is active
Id of plan
Plan Ids Of Recurring Addon Type
CaptureAmount of plan, not editable when plan is active
whether cancel at subscription first trial end,0-false | 1-true, will pass to cancelAtPeriodEnd of subscription
Currency of plan, not editable when plan is active
Description of plan
ExternalPlanId
who pay the gas for crypto payment, merchant|user
HomeUrl,Start With: http
ImageUrl,Start With: http
Number,intervalUnit of plan, not editable when plan is active
Interval unit of plan,em: day|month|year|week, not editable when plan is active
Metadata,Map
Plan's MetricLimit List, nil means no change, empty array means delete all, array with data means full replace
Plan's MetricMeteredCharge
Plan's MetricRecurringCharge
Plan's MultiCurrencies
Plan Ids Of Onetime Addon Type
Name of plan
ProductDescription of plan, Default copy description
Id of product which plan to linked
ProductName of plan, Default copy planName
price of trial period, not available for addon
demand of trial, not available for addon, example, paymentMethod, payment method will ask for subscription trial start
duration of trial,seconds, not available for addon