SDKs for Android / Integrate SDK on application side
  Back to Docs

SDKs for Android

Integrate SDK on application side

  1. Design the user interface for the subscription catalog, viewing information about the user’s current subscription, and other pages in your application.
  2. Implement purchase and management of a user’s subscription using SDK methods.

Subscription purchase scenario

  1. 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.

  1. The application displays subscription plans to the user.
  2. The user selects a plan and proceeds to the payment stage.
  3. The application receives the URL to open the payment interface using the getSubscriptionPurchaseUrl method.
  4. The application opens the received URL in a browser or WebView.
  5. The user pays for a subscription.

Subscription management scenario

  1. The application requests a list of the user’s subscriptions using the getSubscriptions method.
  2. The application requests detailed information about each user’s subscription using the getSubscriptionDetails method (optional).
  3. The application displays a list of subscriptions to the user.
  4. The user selects a subscription and the action he wants to perform — cancel, renew, open a web page to manage subscriptions.
  5. 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.

  1. The application opens the received URL in a browser or WebView.
  2. 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!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: January 22, 2024

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!