I am trying to use checkout graphql API in iOS mobile buy sdk. The storefront token has access
I am using Shopify vault to convert the credit card information to a vault token. and then send that token to complete checkout mutation:
I am getting error
[Buy.Graph.QueryError.Reason(message: "CheckoutCompleteWithCreditCardV2 access denied", line: nil, column: nil)]
As per the Storefront-API checkout guide, to complete a checkout using the checkoutCompleteWithCreditCardv2 mutation you need to have the `write_checkouts_payments` scope enabled for your app. This scope is enabled by turning your app into a sales channel app and then requesting for payment processing
Storefront.Checkoutresource provides a
webUrlthat you can use to present a web view.
@hassain Thanks for your response. Our app is listed as 'sales channel'. I have also requested for payment processing access. However our request is not getting approved saying we don't have proper use case for the payment processing.
I am aware of the web checkout flow. We already have that feature in the mobile app and now would like to be able to add a native checkout using the checkoutCompleteWithCreditCardv2 mutation.
Hey @Rishabh_Tayal ,
Thank you for all of the additional information.
As mentioned in my previous comment in order to use the checkoutCompleteWithCreditCardv2 mutation you will need to have the `write_checkouts_payments` scope enabled for your app, and this scope can only be enabled by being a sales channel app and receiving access for payment processing. So if you were not approved for payment processing for your use case, then you will not be able to use this mutation.
In your situation, remaining with your current web checkout flow would be the best (in terms of ease of implementation and for security purposes) and only viable solution for completing the checkout in your app.
I got permission for payment processing by filling out this form https://docs.google.com/forms/d/e/1FAIpQLSfaiwWJwTsMKKi6Sl-qfiLMwKRKyZ9TxBuutumkk6ThisFTUg/viewform. I'm still getting the “CheckoutCompleteWithCreditCardV2 access denied” error when I try to make a GraphQL query using mobileBuySDK. Our app is a sales channel and has access to Checkout API.
I'm using the card Vault https://github.com/Shopify/mobile-buy-sdk-ios/#card-vaulting- for generating the token and followed this process https://github.com/Shopify/mobile-buy-sdk-ios/#credit-card-checkout- to checkout using credit card. This is where I get the “CheckoutCompleteWithCreditCardV2 access denied” error. Can you let me know why this may be happening? or how can we make sure that write_checkouts_payments scope is enabled for our app ?
Any help would be appreciated. Thanks.