Subscription lifecycle¶
This page shows the states of the services of a user in the MEGOGO billing: subscriptions (SVOD), rents (TVOD) and purchases (DTO). It also shows how you keep your system and MEGOGO in the same state.
Your system is the master: you sell the services and you bill the users. MEGOGO only records the services that you send. The Billing API does not send notifications to your system.
Subscription (SVOD)¶
stateDiagram-v2
[*] --> Active: subscribe
Active --> Active: subscribe (renewal by the partner, +1 period)
Active --> Suspended: suspend
Suspended --> Active: resume
Active --> Ended: unsubscribe
Suspended --> Ended: unsubscribe
Active --> Ended: end date (renewal by the partner)
Ended --> Active: subscribe
| State | In user/subscriptions |
The user can watch |
|---|---|---|
| Active | Yes, in svod, with dateFinish |
Yes |
| Suspended | No | No. The paid time is kept until resume |
| Ended | No | No |
The renewal mode of the service changes the Active state:
| Mode | What keeps the subscription active |
|---|---|
| Automatic renewal | MEGOGO renews the subscription each period until you send unsubscribe |
| Renewal by the partner | Each subscribe adds one period. Without a new subscribe, the subscription ends at dateFinish |
For the requests, see Sell a subscription.
NOTE
A suspended subscription and an ended subscription look the same in
user/subscriptions: the subscription is not in the response. Keep the
state "suspended" in your system.
Rent (TVOD)¶
stateDiagram-v2
[*] --> Unwatched: buyMovie
Unwatched --> Started: first /stream with src
Started --> [*]: dateFinish
| State | status in user/subscriptions |
dateFinish |
|---|---|---|
| Unwatched | unwatched |
No |
| Started | started |
The end of the rent period |
The rent period starts at the first /stream response with src, not at
the purchase. See Sell a single title.
Purchase (DTO)¶
buyMovie with a DTO tariff gives the user access for the period of the
tariff, for example 3650 days. The purchase is in the dto array of
user/subscriptions, without status and without dateFinish.
Cancel a purchase¶
The Billing API has no request to cancel a rent or a purchase
(buyMovie). If you must return the money to a user, contact your MEGOGO
manager.
Reconciliation¶
Compare your data with MEGOGO regularly, for example one time each day, and after each failed or timed-out request:
- Send
user/subscriptionsfor each user with an active service in your system. - Compare the services and the end dates.
- Correct the difference:
| Your system | MEGOGO | Action |
|---|---|---|
| Active subscription | Not in svod |
If the subscription is suspended in your system, no action is necessary. If not, send subscribe |
| No subscription | In svod |
Send unsubscribe |
| End date | Other dateFinish |
Use dateFinish of MEGOGO. Do not calculate the end date yourself |
| Purchase (DTO), or a rent that did not end | Not in tvod or dto |
Send buyMovie again with the same tariff_id. Code 400 means that the purchase is already recorded |
Before you send subscribe in the mode "renewal by the partner", make
sure that the subscription is not in svod: each subscribe adds one
period.
Related pages¶
Guide version 1.4.1, 2026-10-31 · Report a problem on this page