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.
couponobjectAn 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.
Language
Authorization
Header
Click Try It! to start a request and see the response here!