Create subscription

Use this endpoint to create externally-managed subscriptions - subscriptions whose lifecycle is managed outside of Cleeng.

You can create multiple subscriptions for the same offer and customer with this endpoint. But the endpoint prevents duplicate subscriptions with the same external ID and source. It only allows new subscriptions if there isn't already an active subscription from the same source and with the same external ID.

Important
This endpoint can only be used for creating subscriptions (offers with recurring payments). It cannot be used for one-time payment offers such as passes, live events (previously called live pay-per-view), or one-time purchase (previously called TVOD). (For more information on offers, see What is a Cleeng offer?).

Body Params
int32
required

The identifier of Cleeng customer. Minimum: 100000000, maximum: 999999999.

string
required

The identifier of Cleeng offer. It must be offerId of a subscription offer.

int32
required

The identifier of the payment method configured for externally-managed subscriptions; provided by Cleeng.

string
required

The external identifier of a subscription. The identifier must be unique for a given payment method (i.e. you can't have two identical identifiers for the same payment method).

int32

Expiration time in UNIX timestamp format. If not provided, the subscription will have its expiration date set in the following way: it will be pushed from the current time by offer cycle length.

boolean

Subscription trial status. The default value is false.

externalProperties
object

Any properties of a subscription.

int32

The identifier of Cleeng payment. (Payment must be created with the same paymentMethodId as specified here).

Headers
string
Defaults to application/json
Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json