Mobile: Android SDK For AI agents: visit https://docs.payb.is/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Jump to Content Status page GuidesRecipesAPI ReferenceChangelog v4.1.12Status page Guides v4.1.12GuidesRecipesAPI ReferenceChangelog Mobile: Android SDK About Paybis Welcome to Paybis Why Integrate with Usgetting started Integration Process Whitelabel SetupRamps Fiat-to-Crypto On Ramp Crypto-to-Fiat Off Ramp Capabilities and Coverage Supported Assets Supported Countries Payment Methods Payout Methods Ramps Integration Guides Choosing the Right Integration Path Platform Compatibility & Limitations Web: API-Based Integration Web: Standalone Integration Generating HMAC Signatures Web SDK Embedded Mode Standalone Integration Guide Custom Frontend Integration: Technical Requirements Internal Events Helpful Tips Mobile: iOS SDK Mobile: Android SDK Mobile: SDK Integration on Flutter Apps Ramp SDK for React Native Use cases Frictionless Off-Ramping for Wallets One-click checkout One-click login and checkout via Apple Pay Promo codes for buying/selling crypto Customizing User Journeys: Remove Any Friction Supply user email and wallet Single sign-on (SSO) Reusable KYC (Shared KYC) Set default payment method Control transaction fiat, crypto and amount Auth key login Set payment method for Google Pay, Apple Pay, and Credit CardsCorporate ramps Product Overview Integration Guide KYB Onboarding Guide Supported Assets Payment and Payout MethodsPaybis Send Product Overview Crypto Pay-outs Integration Guide Fiat Pay-outs Integration Guide Crypto Pay-ins Integration Guide Partner Portal Overview Send Crypto Payouts Send Fiat Payouts Transaction Overview Capabilities and Coverage Supported AssetsPartner portal Product Overview Left-side panel and Dashboard Profile SettingsHElp and support Partner support portalRAMP Integration for EMI EMI Partner API Integration Guide Powered by Mobile: Android SDK Integration guide 1. Get an API key During your onboarding process, your dedicated integration manager will provide you with your unique API key. If at any time you lose your API key, please reach out to your dedicated integration manager to reset your API key. You can also find the API key in the Partner Portal under the "For developers" section. 2. Build Integration Now that you have an API key you are able to set up crypto purchases via Widget in several ways. You can build the integration with a quote or without a quote. Integration without a quote When you build an integration without a quote it means you don't show your customer a quote for purchase in your UI. Your customer starts his journey without predefined transaction details. It is a more simple integration and you can implement it by creating simple CTA (call to action) buttons in your UI. Your customer will be able to select everything (cryptocurrency, fiat currency, amount, etc) in the widget and his journey will start from an exchange form. To implement this type of integration you will need to: Create a requestID with an empty quote. You still have an option to add parameters when creating the requestID. You can read more about it in Create request. After you receive the requestID you can initiate the Android widget with it. Please read the Android widget installation guide here. Integration with a quote You can also build an integration with a quote. It is a bit more complicated than the integration without a quote because you have to use one more API endpoint. This also means you will need to spend more time developing your UI. This integration is useful if you want to allow your customer to see transaction details in your UI. It is also being used when implementing several on-ramp solutions and allowing your customer to compare how much they get for their money from different providers. When you implement this type of integration your customer will start their journey with predefined transaction values like transaction amount, cryptocurrency, fiat currency, etc. To implement this type of integration you will need to: Create a quote first. Please read more about how to create a quote here. Create a requestID with the quoteID you got from the quote you created. Please read more about creating requestID here. After you receive requestID you can initiate a widget Android with it. Please read Android installation guide here. 📘 Important Tip! Tip: when building your UI in order to get the list of available fiat/crypto pairs and their respective min/max limits per transaction use the Get currency pairs to buy crypto and Get currency pairs to sell crypto endpoints. Please note the API endpoints for environments: Sandbox for testing: - https://widget-api.sandbox.paybis.com/v1/* Production: - https://widget-api.paybis.com/v1/ 3. Setup the Paybis Widget Android SDK Add our SDK to your project so you can run the widget’s UI and handle its events. More information about the Android SDK can be found here. 4. Run the widget With the requestId received, you can start the widget using Android SDK. For that, you need to request the start function. As a result, the widget’s UI is displayed over your application and the user can interact with it directly. Installation guide Maven Firstly you’ll need to ask Paybis team for your personal private token to SDK’s Maven repository Open project-level build.gradle and add following to authenticate to the Package Registry allprojects { repositories { ... other repositories above ... maven { url "https://gitlab.com/api/v4/projects/37932505/packages/maven" name "GitLab" credentials(HttpHeaderCredentials) { name = 'Private-Token' value = *Your private token* } authentication { header(HttpHeaderAuthentication) } } } } For Gradle version 7+ this code goes to settings.gradle dependencyResolutionManagement { ... other repositories above ... maven { url "https://gitlab.com/api/v4/projects/37932505/packages/maven" name "GitLab" credentials(HttpHeaderCredentials) { name = 'Private-Token' value = *Your private token* } authentication { header(HttpHeaderAuthentication) } } } After that, you can add Paybis SDK as a project dependency. Add this line to your app-level build.gradle (latest version number can be found on changelog) dependencies { implementation "com.paybis:mobile_widget_sdk:$latestVersion" } SDK has an implementation for QR code scanning that users may want to use to scan their crypto wallet address. For this, you may add Camera permission to your application AndroidManifest.xml <manifest> ... other permissions above ... <uses-permission android:name="android.permission.CAMERA" /> ... your classes and meta data below ... </manifest> SDK is built using DataBinding, so please add the following code to your Gradle files android { ... buildFeatures { dataBinding = true } } Additional dependencies The widget uses SumSub library for Know Your Customer process and risk.js package for the payment fraud detection, it is required to add the following dependencies to the project-level build.gradle. repositories { ... other repositories above ... maven { url 'https://jitpack.io' } maven { url "https://maven.sumsub.com/repository/maven-public/" } // for mobsdk versions 2.2.8+ maven { url = uri("https://maven.fpregistry.io/releases") } } Start widget You can start PaybisMobileWidget with your requestId any time. This method will start a new activity with crypto purchase flow. This flow includes user authentication. PaybisMobileWidget.startWidget( application, PaybisEnvironment.SANDBOX, "<generated_request_id>", null, false ) Possible Environment values: enum class PaybisEnvironment { SANDBOX, QA, PROD } Single sign-on flow You can avoid user authentication by providing oneTimeToken when starting widget PaybisMobileWidget.startWidget( application, PaybisEnvironment.SANDBOX, "<generated_request_id>", "<generated_one_time_token>", false ) To get your oneTimeToken you just need to create Request passing passwordless parameter as true, according to API documentation. Android SDK options NameArgumentsDetailsstartWidgetapplication - your Application instance [required] environment - widget environment [required] requestId - generated unique requestId [required] oneTimeToken - generated one-time token [optional]used to open the widget UIcloseWidgetn/aused to close the widget UI SDK Events NameArgumentsDetailsPaymentInitiated-Issued when a user has initiated the payment in the widget (relevant for Frictionless sell crypto flow) SDK API Usage Examples The examples below are related to the above table. The following list is not meant to be a guide but simply demonstrates a possible usage of the SDK Kotlin class ExampleActivity : AppCompatActivity() { private val vm by viewModels<ExampleViewModel>() ... override fun onStart() { ... // Here should be your logic to retreive `requestId` and `oneTimeToken` (if needed) vm.requestCreated .onEach { request -> startWidget(request.requestId, request.oneTimeToken) } .launchIn(lifecycleScope) } private fun startWidget(requestId: String, oneTimeToken: String?) { // some logic to define which environment you want to use val paybisEnv = if (BuildConfig.FLAVOR == "prod") PaybisEnvironment.PROD else PaybisEnvironment.SANDBOX PaybisMobileWidget.startWidget( application, paybisEnv, requestId, oneTimeToken, ) } } In frictionless Offramp flow, you can react to the payment being initiated and close the widget when the following event is sent: Kotlin PaybisMobileWidget.setPaymentInitiatedListener { PaybisMobileWidget.closeWidget() } There is also an event that is sent when the widget is closed: Kotlin PaybisMobileWidget.setCloseWidgetListener { // react to the event here } Updated 5 months ago Mobile: iOS SDK Mobile: SDK Integration on Flutter Apps Did this page help you? Yes No Copy Page Integration guide 1. Get an API key 2. Build Integration 3. Setup the Paybis Widget Android SDK 4. Run the widget Installation guide Maven Additional dependencies Start widget Android SDK options SDK Events SDK API Usage Examples