To initialize the library, add the following lines to your Android project source code according to the application logic (e.g., at application startup):
XSubscriptions.init(projectId, sandbox = true) XSubscriptions.authenticate(token)
projectId parameter of the
XSubscriptions.init method, pass the project ID, which can be found in the Publisher Account next to the name of your project.
sandbox parameter of the
XSubscriptions.init method is responsible for choosing sandbox or live mode for payment processing.
For testing, pass
sandbox = true. After launching the project for the release version of your application, change the value to
sandbox = false.
token parameter of the
XSubscriptions.authenticate method, pass the user’s JWT received during authorization in the application.
Found a typo or other text error? Select the text and press Ctrl+Enter.