v1

latestOpenAPI 3.1.02026-07-241080412.6 KB

Renew subscription

Use this endpoint to renew externally-managed subscriptions (EMS) - subscriptions whose life cycle is managed outside of Cleeng.

post/subscriptions/{subscriptionId}/renew

Path parameters

subscriptionIdinteger required

Subscription identifier in Cleeng.

Headers

Content-Typestring

Request body

expiresAtinteger

Expiration time in UNIX timestamp format.

paymentIdinteger

The identifier of Cleeng payment.

convertTrialboolean

Indicates whether a subscription should be converted to a paid subscription during the renewal process. If not provided, defaults to false. If set to true, it will convert the trial on subscription to 0. <br /> Example: convertTrial: true

Response

200

subscriptionIdinteger
{"stackTrail":"paths:/subscriptions/{subscriptionId}/renew:post:responses:200:content:application/json:schema:properties:paymentDetailsId","oasType":"schema","type":"unknown"}
publisherIdinteger
customerIdinteger
statusstring
dateFrominteger
dateTointeger
nextPaymentActionstring
nextPaymentActionDateinteger
subscriptionExternalIdstring
offerIdstring
paymentCountrystring
{"stackTrail":"paths:/subscriptions/{subscriptionId}/renew:post:responses:200:content:application/json:schema:properties:ipAddress","oasType":"schema","type":"unknown"}
inTrialboolean
{"stackTrail":"paths:/subscriptions/{subscriptionId}/renew:post:responses:200:content:application/json:schema:properties:couponCode","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/subscriptions/{subscriptionId}/renew:post:responses:200:content:application/json:schema:properties:pendingSwitchId","oasType":"schema","type":"unknown"}
externalPropertiesobject
paymentMethodIdinteger
isExternallyManagedboolean
sourcestring
{"stackTrail":"paths:/subscriptions/{subscriptionId}/renew:post:responses:200:content:application/json:schema:properties:terminationType","oasType":"schema","type":"unknown"}

Example response

{
  "subscriptionId": 123456789,
  "publisherId": 111111111,
  "customerId": 123456789,
  "status": "active",
  "dateFrom": 1696502765,
  "dateTo": 1700912767,
  "nextPaymentAction": "authorise",
  "nextPaymentActionDate": 1700912767,
  "subscriptionExternalId": "CustomExternalId",
  "offerId": "S123456789_PL",
  "paymentCountry": "PL",
  "paymentMethodId": 987654321,
  "isExternallyManaged": true,
  "replacedBy": {
    "subscriptionId": 100000000,
    "reason": "string"
  },
  "originatedFrom": {
    "subscriptionId": 111111111,
    "reason": "string"
  },
  "source": "samsung",
  "renewalCycle": {
    "unit": "month",
    "amount": 3
  }
}