Skip to main content

Configuration

Required Permissions​

Add the following permissions to your AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  • INTERNET — Required to load the checkout WebView and communicate with WePay servers.
  • ACCESS_NETWORK_STATE — Allows the SDK to check network availability before loading.

Manifest Registration​

The WebViewPaymentActivity is bundled with the SDK and registered automatically via manifest merging. No manual activity registration is required.

If you experience merge conflicts, you can explicitly declare the activity:

<activity
android:name="com.wepay.sdk.payment.WebViewPaymentActivity"
android:exported="false"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />

ProGuard / R8​

If you use ProGuard or R8, add these rules to your proguard-rules.pro to prevent SDK classes from being obfuscated:

-keep class com.wepay.sdk.** { *; }
-keepclassmembers class com.wepay.sdk.** { *; }

Network Security​

If your backend or WePay endpoints require specific network security configuration, add a network_security_config.xml:

<!-- res/xml/network_security_config.xml -->
<network-security-config>
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">api.wepay.com.sa</domain>
<domain includeSubdomains="true">pay.wepay.com</domain>
</domain-config>
</network-security-config>

And reference it in your AndroidManifest.xml:

<application
android:networkSecurityConfig="@xml/network_security_config"
...>