post https://api.sandbox.cleeng.com/3.1/subscriptions
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
Response | Type | Description |
---|---|---|
subscriptionId | integer | Subscription identifier in Cleeng. |
publisherId | integer | The identifier of broadcaster (publisher) in Cleeng. |
customerId | integer | The identifier of Cleeng customer. |
status | string | The current status of a subscription. Allowed values: active , stopped , terminated . |
dateFrom | integer | Start of a subscription period (in UNIX timestamp format). |
dateTo | integer | End of a subscription period (in UNIX timestamp format). |
subscriptionExternalId | string | The external identifier of a subscription. |
offerId | string | The identifier of Cleeng offer, e.g. S123123123_US. |
paymentCountry | string | The country of the last payment. |
ipAddress | string | The last IP address of a customer. |
inTrial | boolean | Subscription trial status. |
couponCode | string | Applied coupon code. |
coupon deprecated | object | An object with discountRate and usageLeft properties. |
-discountRate | number | Offer discount, e.g. 0.1 means 10% discount. Allowed values: 0.01 - 1. |
-usageleft | integer | The number of times left that a customer can enter the coupon code. |
pendingSwitchId | string | The 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). |
paymentMethodId | integer | The identifier of the payment method, provided by Cleeng. |
paymentDetailsId | integer | The identifier of Cleeng payment details connected to Cleeng customer. Here: null . |
nextPaymentAction | string | A kind of the next payment action, either authorisation or capture. |
nextPaymentActionDate | integer | The date of the next payment action (authorisation or capture) (in UNIX timestamp format). |
externalProperties | object | External properties that can be used to store additional metadata from the external system, ex. partnerID , externalProductId , partnerCode , etc. |
isExternallyManaged | boolean | Whether a subscription is externally-managed or not. |
replacedBy | An 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. | |
- subscriptionId | integer | Subscription identifier in Cleeng. The identifier of a new subscription (transferred or revived). |
- reason | string | Reason for subscription replacement: transfer if a subscription has been transferred or revival if a subscription has been revived. |
- date | integer | The date of subscription replacement (in UNIX timestamp format). |
originatedFrom | An object with properties that refer to processes where one subscription replaces another one. | |
- subscriptionId | integer | Subscription identifier in Cleeng. The identifier of the previous subscription - the one that has been transferred or revived. |
- reason | string | Reason for subscription replacement: transfer if a subscription has been transferred or revival if a subscription has been revived. |
- date | integer | The date of subscription replacement (in UNIX timestamp format). |