docs: WebView integration guide for buyer-experience checkout#86
Conversation
Covers URL construction, query params (mode, callbackScheme, theme, themeVariables), JS bridge messages (WC_PAY_COMPLETE/CANCELLED/ERROR), and platform examples for Android/Kotlin, iOS/Swift, React Native, and Flutter. Wires page into both docs.json nav versions and updates the wallets overview.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
…-examples#570 Fix param names (returnUrl, preferUniversalLinks — not mode/callbackScheme), message types (PAY_SUCCESS/PAY_FAILURE — not WC_PAY_*), add wallet deeplink interception pattern, update all four platform examples. Reference example links to the RN PR.
|
Updated with correct implementation details from reown-com/react-native-examples#570: Corrected from first draft:
All four platform examples (React Native, Android/Kotlin, iOS/Swift, Flutter) updated accordingly. |
| | Parameter | Required | Description | | ||
| |---|---|---| | ||
| | `returnUrl` | **Yes** | Your app's native deep link (e.g. `myapp://`). The checkout passes this to wallets as the return destination so the OS routes the user back after signing. | | ||
| | `preferUniversalLinks` | Recommended | Set to `1`. Tells the checkout to open wallets via universal links (`https://`) rather than custom URL schemes when both are available — more reliable on iOS. | |
There was a problem hiding this comment.
@WalletConnectBot preferUniversalLinks is mandatory too, if not, the dapp wont be able to open the wallet to start the connection
|
|
||
| ## Prerequisites | ||
|
|
||
| - A `gatewayUrl` from the [Merchant API](/payments/ecommerce/integration) (`POST /v1/merchant/payment`) |
There was a problem hiding this comment.
ecommerce integration? is this ok?
There was a problem hiding this comment.
@ignaciosantise It's not required, right? if we do BX flow without ecommerce
There was a problem hiding this comment.
Somehow the dapp needs a payment URL, that's why it added this as prerequisite
Co-authored-by: Ignacio Santise <25931366+ignaciosantise@users.noreply.github.com>
Co-authored-by: Ignacio Santise <25931366+ignaciosantise@users.noreply.github.com>
Wallet opens route through same-frame navigation (onShouldStartLoadWithRequest), so onOpenWindow/setSupportMultipleWindows were dead code. Removes them from the RN sample, drops the setSupportMultipleWindows Info note, trims the "handle both window.open() calls" wording, clarifies the JS/DOM-storage best practice, and points the reference card at the source folder on main instead of the PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Android: dispatch bridge callbacks to the main thread, fix bare
{"success": false} handling via msg.has("success"), guard startActivity
against ActivityNotFoundException, use rememberUpdatedState to avoid stale
callbacks, and tear down the WebView onRelease to prevent leaks.
- iOS: inject a window.ReactNativeWebView.postMessage shim so the checkout's
bridge messages reach WKWebView, and filter navigation schemes.
- Flutter: await launchUrl in an async onNavigationRequest with error handling.
Manually verified on each platform.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds documentation for the WebView rendering mode shipped in WalletConnect/buyer-experience#967.
What's in this PR
payments/wallets/webview.mdx— full integration guide covering:gatewayUrl+mode=webview,callbackScheme,theme,themeVariablesparams)WC_PAY_COMPLETE/WC_PAY_CANCELLED/WC_PAY_ERROR)callbackSchememanifest setup (Android + iOS)docs.json— page wired into both2026-02-18and2026-02-19.previewnav versions under "WalletConnect Pay for Wallets"payments/wallets/overview.mdx— new "WebView Integration" card added to the integration options sectionThe specific query parameter names (
mode,callbackScheme) and bridge message types (WC_PAY_COMPLETEetc.) are inferred from the existing IC-webview patterns and general convention — please verify them against the actual implementation in buyer-experience#967 and adjust before merging.Slack thread: https://walletconnect.slack.com/archives/C0A2MNBKUAC/p1784118273297959