Confusing Documentation around Stripe and Shopify

Highlighted
Tourist
25 0 3

Hi,


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-wi... 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 `PaymentTokenType`s accepted are `APPLE_PAY`, `GOOGLE_PAY`, `SHOPIFY_PAY`, and `VAULT`. I don't see an option for a custom (or stripe) token. 


Looking at the Checkout API at https://shopify.dev/docs/admin-api/rest/reference/sales-channels/checkout?api[version]=2020-04 , I see a `complete` POST at https://shopify.dev/docs/admin-api/rest/reference/sales-channels/checkout?api[version]=2020-04#compl.... And that does not require a separate payment token. Does that mean I should be using `checkoutCompleteFree` https://shopify.dev/docs/storefront-api/reference/mutation/checkoutcompletefree?api[version]=2020-04 instead? According to its documentation that API endpoint is not intended for processing external payments (The docs read "Completes a checkout without providing payment information. You can use this mutation for free items or items whose purchase price is covered by a gift card."), but I am not able to think of another option here.

 

Sorry for the long (and confusing post). I guess it sheds a light on how confused I am regarding all these different options out there.

0 Likes
Highlighted
Tourist
25 0 3

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 `EXTERNAL` `CUSTOM` type here if I am understanding things correctly.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
439 90 67

Hi @cansin 

 

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

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes
Highlighted
Tourist
25 0 3

@vix thank you for your reply. So are you suggesting it is *not* possible one to implement its own checkout experience?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
439 90 67

Hey @cansin 

 

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. 

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes
Highlighted
Tourist
25 0 3

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?

0 Likes
Highlighted
Tourist
25 0 3

Also, I am still not sure what this means if it is not possible to create a custom checkout experience: https://shopify.dev/tutorials/authenticate-a-public-app-with-oauth#request-payment-processing . This documentation makes it sound like I should be able to integrate with Stripe. I have a private app for my shop.

0 Likes
Highlighted
Tourist
25 0 3

Following on that first link, this documentation https://shopify.dev/tutorials/complete-a-sales-channel-payment-with-checkout-api#integrate-stripe-wi... suggests I should be able to integrate Stripe with Shopify. Can you please advice further? I think there is a disconnect somewhere.

1 Like
Highlighted
Shopify Partner
49 5 14

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.

1 Like
Highlighted
Shopify Staff
Shopify Staff
439 90 67

Hi everyone - 

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. 

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes