> For the complete documentation index, see [llms.txt](https://docs.coda.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coda.co/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/webview-zhu-yi-shi-xiang/webview-url-scheme-zhong-dian-shi-xiang.md).

# Webview URL Scheme 重点事项

**处理重定向**

在使用 Webview 时，一些支付渠道可能会将用户重定向到他们的电子钱包应用程序。为了正确处理这些重定向，您需要在 Webview 中使用 `WebViewClient.shouldOverrideUrlLoading` 方法，并根据以下的 intent 进行处理：

* **重定向处理**：一些支付渠道使用自定义 URL Scheme（如 `gojek://` 或 `intent://`）来调用电子钱包应用。如果 Webview 无法识别这些自定义 Scheme，将导致无法正确打开钱包应用。

#### 代码示例

```java
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
    if (url != null && url.startsWith("gojek://")) {
        // 处理 Gojek 钱包重定向
        return true;
    }
    return false; // 默认行为：对于标准的 URL Scheme 继续加载
}
```

通过实现这个方法，您可以确保 Webview 能够正确处理来自支付渠道的重定向请求，避免因无法识别自定义 URL Scheme 而导致的错误。

## intent渠道列表

| 地区            | 渠道         | Override URL                            | 仅支持外部浏览器             |
| ------------- | ---------- | --------------------------------------- | -------------------- |
| Brazil        | PicPay     | picpay://                               |                      |
| Brazil        | AmeDigital | amedigital://                           |                      |
| Indonesia     | GO-PAY     | gojek://                                |                      |
| Indonesia     | Shopee Pay | shopeeid://                             |                      |
| Indonesia     | Dana       | danaid:// & market://details?id=id.dana |                      |
| Malaysia      | GrabPay    | grab://                                 |                      |
| Malaysia      | Shopee Pay | shopeemy://                             |                      |
| Malaysia      | Maxis      | sms:32083                               |                      |
| Malaysia      | -          | -                                       | U Mobile             |
| Singapore     | GrabPay    | grab://                                 |                      |
| Philippines   | GrabPay    | grab://                                 |                      |
| Thailand      | Shopee Pay | intent://                               |                      |
| Taiwan        | Line Pay   | intent://                               |                      |
| Myanmar       | KBZPay     | intent://                               |                      |
| Vietnam       | MoMo       | momo://                                 |                      |
| All countries | -          | -                                       | Google Pay/Apple Pay |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coda.co/https-coda-payments.gitbook.io-zhong-wen-coda-private-technical-documentation/codapay/webview-zhu-yi-shi-xiang/webview-url-scheme-zhong-dian-shi-xiang.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
