Detect checkout completion storefront graphql api

chirancjr
Shopify Partner
3 0 0

I have use webviwe to complete the checkout in react-native app,

but i need to detect whether user have successfully paid and complete the checkout

is there any way to detect it with storefront graphql api

Replies 5 (5)
SBD_
Shopify Staff
Shopify Staff
1602 227 334

Hey @chirancjr 

 

If you're able to use the Cart flow, the cart will return `null` once checkout completes. I don't believe there's a way to see if a checkout is complete using the Checkout flow,

Scott | Developer Advocate @ Shopify 

chirancjr
Shopify Partner
3 0 0

If i use cart flow user will have to log in again in checkout page. its not good for user experience,

 

in that case also do we need to send frequent api call and check whether cart is null?

SBD_
Shopify Staff
Shopify Staff
1602 227 334

Agreed - that's being worked on.

 

In a web setting, it's common to check on page load. For an app I guess you'd have to poll to check.

Scott | Developer Advocate @ Shopify 

chirancjr
Shopify Partner
3 0 0

Thanks for the update, is there any solution in upcoming release or roadmap

SBD_
Shopify Staff
Shopify Staff
1602 227 334

On second thoughts, give the new Customer API a try? I believe it solves the login issue.

Scott | Developer Advocate @ Shopify