Native App Checkout Integration¶
-
Your server would need to fetch the available payment options from us, before displaying Tamara on your checkout page. Tamara will return the minimum and maximum order limits, based on which, you can allow whether or not the customer can pay with Tamara.
-
When a customer chooses Tamara and proceeds to checkout, your server would need to create a checkout session request to transmit the details of purchase, such as the amount, currency, customer information, and unique order reference ID. Tamara will return a unique order ID and a checkout URL for completing the transaction.
-
Your mobile app will then open the WebView and load the checkout URL generated in the above step.
-
Tamara will send the verification code to the customer’s mobile number via an SMS.
-
The customer will verify themselves with the received code and complete the checkout process.
-
The customer will then be redirected to your mobile app via the respective status URLs that were provided in your checkout session request.
-
Your mobile app will then display the corresponding message based on the redirection status URL.
Mobile App Integration Workflow¶
Mobile SDKs
We also provide iOS SDK and Android SDK to help reduce the integration efforts from steps 3 to 7.
Apple Pay with WebView on iOS
We recommend using SFSafariViewController with WebView in order to smoothly support Apple Pay.
Alternatively, you can use UIWebView or WKWebview, keeping in mind the below conditions:
-
Webpages loaded in WKWebView can now accept Apple Pay. In order to protect the security of Apple Pay transactions in WKWebView, Apple Pay cannot be used alongside of script injection APIs such as WKUserScript or evaluateJavaScript(_:completionHandler:).
-
If these APIs are invoked before a webpage uses Apple Pay, Apple Pay will be disabled. If a webpage uses Apple Pay before evaluateJavaScript(_:completionHandler:) is invoked, the completion handler will be called with a non-nil NSError. These restrictions are reset every time the top frame is navigated.
More details are available here.