Transfer subscription

Use this endpoint to transfer externally-managed subscriptions (EMS) - subscriptions whose life cycle is managed outside of Cleeng. <br><br> Subscription is transferred if there is already an active subscription in Cleeng that belongs to a customer with a different email address. Then a new subscription is created for the "new customer" (the one using the new email address) and the subscription assigned to the "old customer" (the one using the old email address) is terminated. <br><br> Note: For subscription transfer subscription resource payload should be returned in response with non-empty replacedBy property.

post/subscriptions/{subscriptionId}/transfer

Request

  • Base URL
    https://api.sandbox.cleeng.com/3.1
  • URL
    https://api.sandbox.cleeng.com/3.1/subscriptions/{subscriptionId}/transfer
  • Auth
    API key in header X-Publisher-Token

Path parameters

subscriptionIdinteger required

Subscription identifier in Cleeng.

Headers

Content-Typestring

Request body

customerIdinteger

The identifier of Cleeng customer.

Response

200

subscriptionIdinteger
paymentDetailsIdunknown
publisherIdinteger
customerIdinteger
statusstring
dateFrominteger
dateTointeger
nextPaymentActionstring
nextPaymentActionDateinteger
subscriptionExternalIdstring
offerIdstring
paymentCountrystring
ipAddressunknown
inTrialboolean
couponCodeunknown
pendingSwitchIdstring
externalPropertiesobject
paymentMethodIdinteger
isExternallyManagedboolean
sourcestring
terminationTypeunknown

Example response

{
  "subscriptionId": 222222222,
  "publisherId": 111111111,
  "customerId": 123456789,
  "status": "active",
  "dateFrom": 1696502765,
  "dateTo": 1700912767,
  "nextPaymentAction": "capture",
  "nextPaymentActionDate": 1700912767,
  "subscriptionExternalId": "CustomExternalId",
  "offerId": "S123456789_PL",
  "paymentCountry": "PL",
  "inTrial": true,
  "pendingSwitchId": "1fa12f34-1234-1234-b1fc-1c123f12afa1",
  "paymentMethodId": 987654321,
  "isExternallyManaged": true,
  "replacedBy": {
    "subscriptionId": 333333333,
    "reason": "transferred"
  },
  "originatedFrom": {
    "subscriptionId": 111111111,
    "reason": "string"
  },
  "source": "samsung",
  "renewalCycle": {
    "unit": "month",
    "amount": 3
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.