We are trying to build a web product that is deeply integrated with Shopify as an e-commerce backend. For that purpose, we have a shop with a private app. Now, we are trying to integrate our existing Stripe flow into this shop. But, I am reading conflicting documentation around how that can be achieved (or even whether it can be achieved). At https://shopify.dev/tutorials/complete-a-sales-channel-payment-with-checkout-api and https://shopify.dev/tutorials/authenticate-a-public-app-with-oauth#request-payment-processing it looks like a “sales channel” can ask for payment processing capabilities. But as far as I understand, a private app does not have that option through Storefront API. Does that mean we should be creating not just a private app, but also a sales channel of some sort? Do private sales channels exist?
To be more specific at https://shopify.dev/tutorials/complete-a-sales-channel-payment-with-checkout-api#integrate-stripe-with-your-sales-channel-app step 5, it is suggested that “Your channel uses the Checkout API to create a payment transaction, and it passes the token from Stripe to Shopify.”. Assuming the counterpart for that API at Storefront is checkoutCompleteWithTokenizedPaymentV3, the PaymentTokenTypes accepted are APPLE_PAY, GOOGLE_PAY, SHOPIFY_PAY, and VAULT. I don’t see an option for a custom (or stripe) token.
Or perhaps I should be just using checkoutCompleteWithTokenizedPaymentV3 with type VAULT or SHOPIFY_PAY (not sure which one) and pass in any relevant Stripe info I want to store regarding the transaction via paymentData JSON? I feel like there should be an EXTERNALCUSTOM type here if I am understanding things correctly.
Apologies for the confusion. The Storefront API docs are going to be updated to reflect the scenario you are facing. A sales channel is built generally as a 1:many relationship and would be a public app as you’ve mentioned. For a single store web checkout the process is different. The webUrl is the suggested solution for anyone building a web experience. This is because redirecting to the web checkout will not interrupt the flow and provides our PCI compliance, accelerated checkout, and other perks of the hosted checkout. https://shopify.dev/tutorials/create-a-checkout-with-storefront-api#shopify-web-checkout
Correct, for web experiences the web checkout is the only way to complete a checkout. With the Storefront API you can prefill this information so that only the payment step is required for your customer.
Hmm, but when I look at checkoutCompleteWithTokenizedPaymentV3, I do see two payment types that are not mobile-specific: “VAULT” and “SHOPIFY_PAY”. That implies we should be able to use this Storefront API mutation in order to implement a custom checkout page and send the relevant data to Shopify, is that not correct? I am specifically looking to let Stripe handle my checkout flow rather than Shopify, since we have other products (e.g. subscriptions, money exchanges) that rely on our existing Stripe instance. Therefore we’d like to re-use the existing infrastructure for the shopping experience as well, rather than showing a completely different checkout just for the shop (through Shopify). Can you advice?
I have tried what you’ve been doing before. Handle payment in Stripe, and then mark the checkout as paid using storefront API.
Shopify has actively worked against me trying to do this. There is this weird requirement that your app must be a public sales-channel that acts as a marketplace for multiple stores. Even though my app was connected to 3 stores, it was not setup as a market-place.
All I needed was to be able to mark checkouts as paid, using Stripe’s data. The mutations for this already exist, but Shopify refuses to enable it for shops. The webUrl is incredibly counterintuitive if you’re trying to setup a recurring business, especially if you want to support EU payment methods.
I wish you all the best, and I hope you can get payment processing enabled, and manage to get this working. I wasn’t even able to finish my Proof-of-Concept because I couldn’t get this enabled on a development store/app.
Yes it is correct that we have mutations and information on how to complete the checkout through the API - however this is reserved for Sales Channels (public apps) as noted above. If you are creating a headless website for personal use / private app, this does not qualify as a sales channel. There is a permission required to process a checkout in this way, which is only able to be added to a sales channel app. There are also use cases for a native mobile app utilizing the Mobile Buy SDKs to require this.
The only option right now for web is to redirect to the WebURL.
Thanks a lot for confirming. Can you talk more about the Mobile Buy SDKs? Are private apps able to rely on these? Or do we still need to be a public sales channel?
As a side question, what are the requirements to become a public sales channel? Can we simply create a public sales channel app for our own use?
Anyone, please help me to get this answer? I am making a mobile app via storefront API. So why I need to turn the Shopify app into a sales channel ?
that means
i will need to make the app for the Shopify store,
then turn it into a sales channel
Make the Shopify APP public via the Shopify app store.