Subscription lifecycle¶
This page tells how MEGOGO keeps the subscriptions that you activate: the user account, the renewal modes, the states of a subscription and the limits.
The user account¶
- MEGOGO identifies the user by the phone number. One phone number is one MEGOGO user.
- If MEGOGO has no user with this phone number,
subscribecreates the user.subscriptionswith a phone number also creates the user. Senduser/phonefirst if you only want to check the number. - The user signs in to MEGOGO with the phone number and a one-time code that MEGOGO sends by SMS or Viber.
- MEGOGO does not send a message to the user when you activate or stop a subscription. Tell the user yourself. See Activate a subscription.
- Your subscription is in the profile of the user together with other services of the user, for example subscriptions that the user bought from MEGOGO directly.
- The user cannot cancel or renew your subscription in MEGOGO. Only you can do it with the API.
Who bills the user¶
You bill the user and you set the price. MEGOGO does not charge the user
for your subscription. The price and tryAndBuy fields of the responses
are MEGOGO data: do not use them.
Renewal modes¶
You and MEGOGO agree on the renewal mode of each service. MEGOGO configures it in the service ID.
| Mode | Example of a service | What you do | A new subscribe for an active subscription |
|---|---|---|---|
| Automatic renewal, long period | 24 months | Send subscribe when the user buys, and unsubscribe when the user stops |
Code 2023: the subscription is already active. No action is necessary |
| Automatic renewal, 30 days | 30 days | The same | Code 2023 |
| Renewal by the partner | 30 days | Send subscribe for each new period that the user pays |
Adds one period after the current end date |
With automatic renewal, MEGOGO renews the subscription before the end of
each period until you send unsubscribe. The subscription lives until
unsubscribe, also when the period is 24 months.
NOTE
With a long period, the profile of the user shows an end date far in the future. The user can think that the subscription is paid for this time. Tell the user that the subscription works while the user pays you.
Ask your MEGOGO manager for the mode of each service ID.
States of a subscription¶
stateDiagram-v2
[*] --> Active: subscribe
Active --> Active: subscribe (renewal by the partner)
Active --> Suspended: suspend
Suspended --> Active: resume
Active --> Stopped: unsubscribe
Suspended --> Stopped: unsubscribe
Active --> Stopped: end date (no renewal)
Stopped --> Active: subscribe
| State | Access | In subscriptions |
End date |
|---|---|---|---|
| Active | Yes | Yes | dateFinish |
| Suspended | No | No | The time that is left stays. After resume, the end date moves forward by the time of the suspension |
| Stopped | No | No | — |
Rules for suspend and resume¶
- Send
resumeonly after your ownsuspend. If the user has no suspended subscription,resumeworks assubscribe: it adds a period to an active subscription, or it starts a new subscription. - Do not send
subscribewhile the subscription is suspended. It starts a new subscription, and the suspended time does not come back. unsubscribealso stops a suspended subscription. The suspended time is lost.
For most integrations, subscribe and unsubscribe are sufficient. Use
suspend and resume only if you must keep the time that the user paid,
for example during a temporary block of the line.
Two service IDs of one subscription¶
Two of your service IDs can give the same MEGOGO subscription, for example "Light, 1 month" and "Light, 12 months". If the user has both:
- MEGOGO adds the periods to one subscription;
subscriptionsshows one item with the service ID of the lastsubscribe;unsubscribewith the other service ID gives"successful": true, but the subscription does not stop.
CAUTION
Send unsubscribe with the service ID that subscriptions shows for
the user.
Limits¶
- The end date of a subscription cannot be more than 15 years from now. A
subscribethat goes past this limit gives code 2023. unsubscribeandsuspendgive"successful": truealso when the subscription is not active. Usesubscriptionsto check the state.
Reconciliation¶
Your billing is the source of truth for the subscriptions of your users. Compare it with MEGOGO regularly:
- For each user with a changed subscription, get
subscriptionswith the phone number. - If a subscription is active in MEGOGO but not in your billing, send
unsubscribe. - If a subscription is active in your billing but not in MEGOGO, send
subscribe.
Related pages¶
Guide version 1.0.0, 2026-11-02 · Report a problem on this page