Hosted Mode
Currently, we only support the hosted mode, but Wello is actively working towards providing more integration options to enhance the user experience for our partners. Web and Mobile SDKs will be available soon.
If you’d like to offer a selection of fixed cryptocurrencies on your platform, please follow the steps below We recommend all partners follow these steps to avoid any issues that could negatively impact the user experience.
- Get available order limits and asset details: This includes both cryptocurrencies and fiat currencies, from ourTrading Pair API
- Retrieve quotes: Use the codes of cryptocurrency (along with network values) and fiatcurrency listed in the Trading Pair API to get quotes (Quote API)
- Generate a checkout URL: If your user selects Wello, request the checkout URL link by requesting Place Order API, and redirect users to this link using an external browser, iframe or internal webview.
- Transaction completion and redirect: Once users complete their transaction on Wello, we will redirect them back to your app through the redirectURL you provide. This will include specific transaction values (see details in the redirectURL parameter of Place Order API).
Once you have received the URL from the Place Order API, please refer to the sections below for integration through different types of clients.
Web integration
Integrating Wello Ramp is simple and straightforward. All you need to do is redirect users to the URL link we provide. No additional work is needed, just add the link to your app. This applies to both desktop and mobile platforms.
<!--Opens the Wello Ramp widget in a new browser tab-->
<body>
<div class="container">
<button onclick="window.open('https://www.app.wellowallet.com/test?welloPreOrderId=4221571711388049152&merchantUID=1232222&signature=hkUbRD2L3UcagnF42iGoTvj/qa1GL3Y5MbHhTrzN1eZ4B2r2ok+FXCkpGP0Y6MR1gHhvqLKlKUxt7My27ltPhQvRSXz7mwU7vp7F2fhjqO2BVvllC9wyH8NzfMdOXWXOWngFo2xcE0EXNacetFcHRH609dl21KaFBzgcQ4eSk+h1+Wv6vnBsIQJh/E3lkG9IsCABWd4rfPGoqT7dv8izzYa59xq7ekloCLbJw6KFIffb+FmOxz8vFiVLFVSCGajQQJF15e3yM8w+fZvRYSmrlFmm9ks1cjwIWxeuecC/i784BgpXvxcX+DBEVr8f7D2Qh1Xy59jsSt7rvmca9yBjXQ==', '_blank')">Buy with Wello Ramp</button>
</div>
</body>
Please note that if you call from a web application, you will need to pass our web URL (starting as https://..) for redirectURL, in order for us to route users back to your application seamlessly.
iOS integration via browser
Integrating Wello Ramp into your mobile apps under hosted mode is just as easy as integrating it into web apps.
One of the unique aspects of our solution is that we handle the URL composition for you, offering an additional layer of security. This ensures that third parties cannot access order details through URL parameters.
To implement, simply create a Safari view controller and load the provided URL.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Create a button to open the URL
let openURLButton = UIButton(type: .system)
openURLButton.setTitle("Open URL", for: .normal)
openURLButton.addTarget(self, action: #selector(openURL), for: .touchUpInside)
openURLButton.frame = CGRect(x: 100, y: 100, width: 200, height: 50)
view.addSubview(openURLButton)
}
@objc func openURL() {
// The URL to be opened
if let url = URL(string: "<WelloRamp_URL_Provided>") {
// Check if the URL can be opened
if UIApplication.shared.canOpenURL(url) {
// Open the URL
UIApplication.shared.open(url, options: [:], completionHandler: { (success) in
if success {
print("Successfully opened the URL")
} else {
print("Failed to open the URL")
}
})
} else {
print("Invalid URL")
}
}
}
}
For the redirectURL callback, we highly recommend passing a deeplink to us to ensure users are redirected back to the loading page or the result page within your app.
If you have any questions regarding mobile integration (iOS/Android) under hosted mode, feel free to reach out to our team. We are happy to assist you in creating the best user experience.
Android integration via browser
You can integrate Wello Ramp by either opening it in an external browser using intent or within an internal webview.
Opening Wello Ramp through Webview
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
private WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webView = findViewById(R.id.webview);
webView.setWebViewClient(new WebViewClient()); //Making sure website are opened inside WebView
webView.loadUrl("https://www.app.wellowallet.com/test?welloPreOrderId=4221571711388049152&merchantUID=1232222&signature=hkUbRD2L3UcagnF42iGoTvj/qa1GL3Y5MbHhTrzN1eZ4B2r2ok+FXCkpGP0Y6MR1gHhvqLKlKUxt7My27ltPhQvRSXz7mwU7vp7F2fhjqO2BVvllC9wyH8NzfMdOXWXOWngFo2xcE0EXNacetFcHRH609dl21KaFBzgcQ4eSk+h1+Wv6vnBsIQJh/E3lkG9IsCABWd4rfPGoqT7dv8izzYa59xq7ekloCLbJw6KFIffb+FmOxz8vFiVLFVSCGajQQJF15e3yM8w+fZvRYSmrlFmm9ks1cjwIWxeuecC/i784BgpXvxcX+DBEVr8f7D2Qh1Xy59jsSt7rvmca9yBjXQ==");
}
@Override
public void onBackPressed() {
if (webView.canGoBack()) {
webView.goBack(); //Return back to last page
} else {
super.onBackPressed(); //Exit the application
}
}
}
Opening Wello Ramp through Intent
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button openUrlButton = findViewById(R.id.open_url_button);
openUrlButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openUrl("https://www.app.wellowallet.com/test?welloPreOrderId=4221571711388049152&merchantUID=1232222&signature=hkUbRD2L3UcagnF42iGoTvj/qa1GL3Y5MbHhTrzN1eZ4B2r2ok+FXCkpGP0Y6MR1gHhvqLKlKUxt7My27ltPhQvRSXz7mwU7vp7F2fhjqO2BVvllC9wyH8NzfMdOXWXOWngFo2xcE0EXNacetFcHRH609dl21KaFBzgcQ4eSk+h1+Wv6vnBsIQJh/E3lkG9IsCABWd4rfPGoqT7dv8izzYa59xq7ekloCLbJw6KFIffb+FmOxz8vFiVLFVSCGajQQJF15e3yM8w+fZvRYSmrlFmm9ks1cjwIWxeuecC/i784BgpXvxcX+DBEVr8f7D2Qh1Xy59jsSt7rvmca9yBjXQ==");
}
});
}
private void openUrl(String url) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);
}
}
For the redirectURL callback, we highly recommend passing a deeplink to us to ensure users are redirected back to the loading page or the result page within your app.
Updated 4 months ago