POST
/
merchant
/
subscription
/
renew
Renew Subscription
curl --request POST \
  --url https://api.unibee.top/merchant/subscription/renew \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "applyPromoCredit": true,
  "applyPromoCreditAmount": 123,
  "cancelUrl": "<string>",
  "discount": {
    "cycleLimit": 123,
    "discountAmount": 123,
    "discountPercentage": 123,
    "endTime": 123,
    "metadata": {},
    "recurring": true
  },
  "discountCode": "<string>",
  "gatewayId": 123,
  "gatewayPaymentType": "<string>",
  "manualPayment": true,
  "metadata": {},
  "productData": {
    "description": "<string>",
    "name": "<string>"
  },
  "productId": 123,
  "returnUrl": "<string>",
  "subscriptionId": "<string>",
  "taxPercentage": 123,
  "userId": 123
}'
{
  "code": 123,
  "data": {
    "link": "<string>",
    "paid": true,
    "subscription": {
      "addonData": "<string>",
      "amount": 123,
      "billingCycleAnchor": 123,
      "cancelAtPeriodEnd": 123,
      "cancelOrExpireTime": 123,
      "cancelReason": "<string>",
      "countryCode": "<string>",
      "createTime": 123,
      "currency": "<string>",
      "currentPeriodEnd": 123,
      "currentPeriodPaid": 123,
      "currentPeriodStart": 123,
      "defaultPaymentMethodId": "<string>",
      "dunningTime": 123,
      "externalSubscriptionId": "<string>",
      "features": "<string>",
      "firstPaidTime": 123,
      "gasPayer": "<string>",
      "gatewayId": 123,
      "gatewayStatus": "<string>",
      "id": 123,
      "lastUpdateTime": 123,
      "latestInvoiceId": "<string>",
      "link": "<string>",
      "merchantId": 123,
      "metadata": {},
      "originalPeriodEnd": 123,
      "pendingUpdateId": "<string>",
      "planId": 123,
      "productId": 123,
      "quantity": 123,
      "returnUrl": "<string>",
      "status": 123,
      "subscriptionId": "<string>",
      "taskTime": "<string>",
      "taxPercentage": 123,
      "testClock": 123,
      "trialEnd": 123,
      "type": 123,
      "userId": 123,
      "vatNumber": "<string>"
    }
  },
  "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

renew an exist subscription

Response

200 - application/json

The response is of type object.