Polling for Android Mobile Web View Checkout Completion

Shopify Partner
7 0 3

We are developing Shopify custom storefront app for Android platform using Storefront API.

For completing checkout, we have implemented steps provided for web checkout at below link for Android.


Web checkout: https://github.com/Shopify/mobile-buy-sdk-android#web-checkout-


As mentioned in the accompanying note for web checkout that polling should be called to observe state of checkout completion, as web view doesn't provide any callbacks for various checkout states.


Polling for checkout completion: https://github.com/Shopify/mobile-buy-sdk-android#polling-for-checkout-completion-


The example uses onPayment graph query as node for paymentId to observe if checkout order is placed successfully.

However, paymentId is not available when creating web checkout.


How to implement polling for Android mobile web checkout completion when loading checkout URL within Android app web view component?

Replies 2 (2)
Shopify Staff
Shopify Staff
537 103 113

Hi @Mayank_Kumar 

As stated in the docs, you can poll based on Storefront.Payment value - It is a boolean so true/false will signal a completed vs. non completed request.


Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

6 0 0

@vix, May be you haven't read the question properly.


The question is where to the PaymentId. It is the same as received in checkout.id of Web Checkout method of Android? 

Or we have to fetch it via any another GraphQL call?