POST
/
merchant
/
subscription
/
update_submit
curl --request POST \
  --url https://api.unibee.top/merchant/subscription/update_submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "addonParams": [
    {
      "addonPlanId": 123,
      "quantity": 123
    }
  ],
  "applyPromoCredit": true,
  "applyPromoCreditAmount": 123,
  "cancelUrl": "<string>",
  "confirmCurrency": "<string>",
  "confirmTotalAmount": 123,
  "discount": {
    "cycleLimit": 123,
    "discountAmount": 123,
    "discountPercentage": 123,
    "endTime": 123,
    "metadata": {},
    "recurring": true
  },
  "discountCode": "<string>",
  "effectImmediate": 123,
  "gatewayId": 123,
  "gatewayPaymentType": "<string>",
  "manualPayment": true,
  "metadata": {},
  "newPlanId": 123,
  "productData": {
    "description": "<string>",
    "name": "<string>"
  },
  "prorationDate": 123,
  "quantity": 123,
  "returnUrl": "<string>",
  "subscriptionId": "<string>",
  "taxPercentage": 123,
  "userId": 123
}'
{
  "code": 123,
  "data": {
    "link": "<string>",
    "note": "<string>",
    "paid": true,
    "subscriptionPendingUpdate": {
      "addonData": "<string>",
      "addons": [
        {
          "addonPlan": {
            "amount": 123,
            "bindingAddonIds": "<string>",
            "bindingOnetimeAddonIds": "<string>",
            "cancelAtTrialEnd": 123,
            "checkoutUrl": "<string>",
            "createTime": 123,
            "currency": "<string>",
            "description": "<string>",
            "disableAutoCharge": 123,
            "externalPlanId": "<string>",
            "extraMetricData": "<string>",
            "gasPayer": "<string>",
            "homeUrl": "<string>",
            "id": 123,
            "imageUrl": "<string>",
            "internalName": "<string>",
            "intervalCount": 123,
            "intervalUnit": "<string>",
            "merchantId": 123,
            "metadata": {},
            "metricLimits": [
              {
                "metricId": 123,
                "metricLimit": 123
              }
            ],
            "metricMeteredCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "metricRecurringCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "planName": "<string>",
            "productId": 123,
            "publishStatus": 123,
            "status": 123,
            "taxPercentage": 123,
            "trialAmount": 123,
            "trialDemand": "<string>",
            "trialDurationTime": 123,
            "type": 123
          },
          "quantity": 123
        }
      ],
      "amount": 123,
      "currency": "<string>",
      "effectImmediate": 123,
      "effectTime": 123,
      "gatewayId": 123,
      "gmtCreate": "<string>",
      "gmtModify": "<string>",
      "invoiceId": "<string>",
      "link": "<string>",
      "merchantId": 123,
      "merchantMember": {
        "MemberGroupPermission": {},
        "MemberRoles": [
          {
            "createTime": 123,
            "id": 123,
            "merchantId": 123,
            "permissions": [
              {
                "group": "<string>",
                "permissions": [
                  "<string>"
                ]
              }
            ],
            "role": "<string>"
          }
        ],
        "createTime": 123,
        "email": "<string>",
        "firstName": "<string>",
        "id": 123,
        "isBlankPasswd": true,
        "isOwner": true,
        "lastName": "<string>",
        "merchantId": 123,
        "mobile": "<string>",
        "status": 123
      },
      "metadata": {},
      "note": "<string>",
      "paid": 123,
      "pendingUpdateId": "<string>",
      "plan": {
        "amount": 123,
        "bindingAddonIds": "<string>",
        "bindingOnetimeAddonIds": "<string>",
        "cancelAtTrialEnd": 123,
        "checkoutUrl": "<string>",
        "createTime": 123,
        "currency": "<string>",
        "description": "<string>",
        "disableAutoCharge": 123,
        "externalPlanId": "<string>",
        "extraMetricData": "<string>",
        "gasPayer": "<string>",
        "homeUrl": "<string>",
        "id": 123,
        "imageUrl": "<string>",
        "internalName": "<string>",
        "intervalCount": 123,
        "intervalUnit": "<string>",
        "merchantId": 123,
        "metadata": {},
        "metricLimits": [
          {
            "metricId": 123,
            "metricLimit": 123
          }
        ],
        "metricMeteredCharge": [
          {
            "chargeType": 123,
            "graduatedAmounts": [
              {
                "endValue": 123,
                "flatAmount": 123,
                "perAmount": 123,
                "startValue": 123
              }
            ],
            "metricId": 123,
            "standardAmount": 123,
            "standardStartValue": 123
          }
        ],
        "metricRecurringCharge": [
          {
            "chargeType": 123,
            "graduatedAmounts": [
              {
                "endValue": 123,
                "flatAmount": 123,
                "perAmount": 123,
                "startValue": 123
              }
            ],
            "metricId": 123,
            "standardAmount": 123,
            "standardStartValue": 123
          }
        ],
        "planName": "<string>",
        "productId": 123,
        "publishStatus": 123,
        "status": 123,
        "taxPercentage": 123,
        "trialAmount": 123,
        "trialDemand": "<string>",
        "trialDurationTime": 123,
        "type": 123
      },
      "planId": 123,
      "prorationAmount": 123,
      "quantity": 123,
      "status": 123,
      "subscriptionId": "<string>",
      "updateAddonData": "<string>",
      "updateAddons": [
        {
          "addonPlan": {
            "amount": 123,
            "bindingAddonIds": "<string>",
            "bindingOnetimeAddonIds": "<string>",
            "cancelAtTrialEnd": 123,
            "checkoutUrl": "<string>",
            "createTime": 123,
            "currency": "<string>",
            "description": "<string>",
            "disableAutoCharge": 123,
            "externalPlanId": "<string>",
            "extraMetricData": "<string>",
            "gasPayer": "<string>",
            "homeUrl": "<string>",
            "id": 123,
            "imageUrl": "<string>",
            "internalName": "<string>",
            "intervalCount": 123,
            "intervalUnit": "<string>",
            "merchantId": 123,
            "metadata": {},
            "metricLimits": [
              {
                "metricId": 123,
                "metricLimit": 123
              }
            ],
            "metricMeteredCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "metricRecurringCharge": [
              {
                "chargeType": 123,
                "graduatedAmounts": [
                  {
                    "endValue": 123,
                    "flatAmount": 123,
                    "perAmount": 123,
                    "startValue": 123
                  }
                ],
                "metricId": 123,
                "standardAmount": 123,
                "standardStartValue": 123
              }
            ],
            "planName": "<string>",
            "productId": 123,
            "publishStatus": 123,
            "status": 123,
            "taxPercentage": 123,
            "trialAmount": 123,
            "trialDemand": "<string>",
            "trialDurationTime": 123,
            "type": 123
          },
          "quantity": 123
        }
      ],
      "updateAmount": 123,
      "updateCurrency": "<string>",
      "updatePlan": {
        "amount": 123,
        "bindingAddonIds": "<string>",
        "bindingOnetimeAddonIds": "<string>",
        "cancelAtTrialEnd": 123,
        "checkoutUrl": "<string>",
        "createTime": 123,
        "currency": "<string>",
        "description": "<string>",
        "disableAutoCharge": 123,
        "externalPlanId": "<string>",
        "extraMetricData": "<string>",
        "gasPayer": "<string>",
        "homeUrl": "<string>",
        "id": 123,
        "imageUrl": "<string>",
        "internalName": "<string>",
        "intervalCount": 123,
        "intervalUnit": "<string>",
        "merchantId": 123,
        "metadata": {},
        "metricLimits": [
          {
            "metricId": 123,
            "metricLimit": 123
          }
        ],
        "metricMeteredCharge": [
          {
            "chargeType": 123,
            "graduatedAmounts": [
              {
                "endValue": 123,
                "flatAmount": 123,
                "perAmount": 123,
                "startValue": 123
              }
            ],
            "metricId": 123,
            "standardAmount": 123,
            "standardStartValue": 123
          }
        ],
        "metricRecurringCharge": [
          {
            "chargeType": 123,
            "graduatedAmounts": [
              {
                "endValue": 123,
                "flatAmount": 123,
                "perAmount": 123,
                "startValue": 123
              }
            ],
            "metricId": 123,
            "standardAmount": 123,
            "standardStartValue": 123
          }
        ],
        "planName": "<string>",
        "productId": 123,
        "publishStatus": 123,
        "status": 123,
        "taxPercentage": 123,
        "trialAmount": 123,
        "trialDemand": "<string>",
        "trialDurationTime": 123,
        "type": 123
      },
      "updatePlanId": 123,
      "updateQuantity": 123,
      "userId": 123
    }
  },
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
newPlanId
integer
required

New PlanId

quantity
integer
required

Quantity

addonParams
object[]

addonParams

applyPromoCredit
boolean

apply promo credit or not

applyPromoCreditAmount
integer

apply promo credit amount, auto compute if not specified

cancelUrl
string

CancelUrl

confirmCurrency
string

Currency to verify if provide

confirmTotalAmount
integer

TotalAmount to verify if provide

discount
object
discountCode
string

DiscountCode

effectImmediate
integer

Force Effect Immediate,1-Immediate,2-Next Period, this api will check upgrade|downgrade automatically

gatewayId
integer

Id of gateway

gatewayPaymentType
string

Gateway Payment Type

manualPayment
boolean

ManualPayment

metadata
object

Metadata,Map

productData
object
prorationDate
integer

The utc time to start Proration, default current time

returnUrl
string

ReturnUrl

subscriptionId
string

SubscriptionId, either SubscriptionId or UserId needed, The only one active subscription of userId will update

taxPercentage
integer

TaxPercentage,1000 = 10%, override subscription taxPercentage if provide

userId
integer

UserId, either SubscriptionId or UserId needed, The only one active subscription will update if userId provide instead of subscriptionId

Response

200 - application/json
code
integer
data
object
message
string
redirect
string
requestId
string