Create subscription

Use this endpoint to create externally-managed subscriptions. The life cycle of externally-managed subscriptions is managed outside of Cleeng so it is up to a broadcaster to notify Cleeng about subscription status changes (e.g. subscription termination).

Response description

ResponseTypeDescription
subscriptionIdintegerSubscription identifier in Cleeng.
publisherIdintegerThe identifier of broadcaster (publisher) in Cleeng.
customerIdintegerThe identifier of Cleeng customer.
statusstringThe current status of a subscription. Allowed values: active, stopped, terminated.
dateFromintegerStart of a subscription period (in UNIX timestamp format).
dateTointegerEnd of a subscription period (in UNIX timestamp format).
subscriptionExternalIdstringThe external identifier of a subscription.
offerIdstringThe identifier of Cleeng offer, e.g. S123123123_US.
paymentCountrystringThe country of the last payment.
ipAddressstringThe last IP address of a customer.
inTrialbooleanSubscription trial status.
couponCodestringApplied coupon code.
coupon deprecatedobjectAn object with discountRate and usageLeft properties.
-discountRatenumberOffer discount, e.g. 0.1 means 10% discount. Allowed values: 0.01 - 1.
-usageleftintegerThe number of times left that a customer can enter the coupon code.
pendingSwitchIdstringThe identifier of a subscription switch (upgrade or downgrade) with status pending (the status of the switch between the subscription switch request and the actual switch processing).
paymentMethodIdintegerThe identifier of the payment method, provided by Cleeng.
paymentDetailsIdintegerThe identifier of Cleeng payment details connected to Cleeng customer. Here: null.
nextPaymentActionstringA kind of the next payment action, either authorisation or capture.
nextPaymentActionDateintegerThe date of the next payment action (authorisation or capture) (in UNIX timestamp format).
externalPropertiesobjectExternal properties that can be used to store additional metadata from the external system, ex. partnerID, externalProductId, partnerCode, etc.
isExternallyManagedbooleanWhether a subscription is externally-managed or not.
replacedByAn object with properties that refer to processes where one subscription replaces another one. Subscription resource payload will be returned in response with non-empty replacedBy property after a subscription revival and transfer.
- subscriptionIdintegerSubscription identifier in Cleeng. The identifier of a new subscription (transferred or revived).
- reasonstringReason for subscription replacement: transfer if a subscription has been transferred or revival if a subscription has been revived.
- dateintegerThe date of subscription replacement (in UNIX timestamp format).
originatedFromAn object with properties that refer to processes where one subscription replaces another one.
- subscriptionIdintegerSubscription identifier in Cleeng. The identifier of the previous subscription - the one that has been transferred or revived.
- reasonstringReason for subscription replacement: transfer if a subscription has been transferred or revival if a subscription has been revived.
- dateintegerThe date of subscription replacement (in UNIX timestamp format).
Language
Authorization
Header
Click Try It! to start a request and see the response here!