Skip to main content

Configuration

App Transport Security (Info.plist)​

If your backend domain requires specific network security settings, add the following to your app's Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSExceptionDomains</key>
<dict>
<key>api.wepay.com.sa</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<false/>
</dict>
<key>pay.wepay.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<false/>
</dict>
</dict>
</dict>
important

Keep NSAllowsArbitraryLoads set to false. Only whitelist the specific domains your app communicates with.


Privacy Usage Descriptions​

If the KYC flow requires camera or photo library access, add the appropriate usage descriptions to Info.plist:

<!-- Required if KYC uses camera -->
<key>NSCameraUsageDescription</key>
<string>WePay requires camera access to complete identity verification.</string>

<!-- Required if KYC allows photo selection -->
<key>NSPhotoLibraryUsageDescription</key>
<string>WePay requires photo library access for identity document upload.</string>

API Reference​

WePaySDK​

MethodDescription
openCheckoutUrl(from:checkoutUrl:)Creates and presents WebViewPaymentViewController embedded in a UINavigationController full screen.

WebViewPaymentViewController​

InitializerDescription
init(checkoutUrl: String)Creates the WebView checkout screen for the given checkout URL.

Behavior:

  • Loads the checkout URL in a WKWebView.
  • Monitors URL redirects for /success and /error paths.
  • On /success: shows a success alert, then dismisses.
  • On /error: shows an error alert, then dismisses.