Skip to main content

Overview

We’ll use WKWebView to add Subtotal Link into your iOS application.

Create a view with a button

Add a button that to launch Subtotal Link in a WebView. The WebView handles the entire account linking process.
Create a WKWebView to display Subtotal Link. The WKWebViewConfiguration shown below is required for Subtotal Link to work properly.
Note: To handle the redirect_url when users complete or exit linking, add a Coordinator with WKNavigationDelegate and implement webView(_:decidePolicyFor:decisionHandler:) to detect your URL scheme and dismiss the WebView.

That’s It!

Your iOS app now is now using Subtotal Link to link retail accounts.