Integrate SDK on application side
- Design the user interface for the subscription catalog, viewing information about the user’s current subscription, and other pages in your application.
- Implement purchase and management of a user’s subscription using SDK methods.
Subscription purchase scenario
- The application requests a list of available plans using the following SDK methods:
getSubscriptionPublicPlans
— returns a list of plans available to unauthorized users.getSubscriptionPlans
— returns a list of plans available to authorized users.
- The application displays subscription plans to the user.
- The user selects a plan and proceeds to the payment stage.
- The application receives the URL to open the payment interface using the
getSubscriptionPurchaseUrl
method. - The application opens the received URL in a browser or a pop-up Safari tab.
- The user pays for a subscription.
Subscription management scenario
- The application requests a list of the user’s subscriptions using the
getSubscriptions
method. - The application requests detailed information about each user’s subscription using the
getSubscriptionDetails
method (optional). - The application displays a list of subscriptions to the user.
- The user selects a subscription and the action he wants to perform — cancel, renew, open a web page to manage subscriptions.
- The application calls one of the following methods to handle the action:
cancelSubscription
— to cancel the selected subscription.getSubscriptionRenewalUrl
— to get the URL of the renewal interface for the selected subscription.getSubscriptionManagementUrl
— to get the URL of the management interface for the selected subscription.
- The application opens the received URL in a browser or a pop-up Safari tab.
- The user performs an action on a subscription.
Note
Subscription cancellation occurs immediately after the call to the
cancelSubscription
method — steps 6 and 7 are not performed.Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.