Confusing Documentation around Stripe and Shopify

cansin
Excursionist
27 0 23

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.

Replies 14 (14)

cansin
Excursionist
27 0 23

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.

vix
Shopify Staff
540 103 121

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

To learn more visit the Shopify Help Center or the Community Blog.

cansin
Excursionist
27 0 23

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

vix
Shopify Staff
540 103 121

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. 

To learn more visit the Shopify Help Center or the Community Blog.

cansin
Excursionist
27 0 23

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?

cansin
Excursionist
27 0 23

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.

cansin
Excursionist
27 0 23

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.

tolgapaksoy
Shopify Partner
105 7 64

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.

vix
Shopify Staff
540 103 121

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. 

To learn more visit the Shopify Help Center or the Community Blog.

cansin
Excursionist
27 0 23

Hi @vix ,

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?

Cansin

nuhmansh
Shopify Partner
4 0 1

@cansin wrote:

Hi @vix ,

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?

Cansin


Can anyone please reply to this?

rtdkbd
Shopify Partner
2 0 0

@nuhmansh wrote:

@cansin wrote:

Hi @vix ,

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?

Cansin


Can anyone please reply to this?


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
1. i will need to make the app for the Shopify store,
2. then turn it into a sales channel 
3. Make the Shopify APP public via the Shopify app store.

Anyone can confirm this ?

rtdkbd
Shopify Partner
2 0 0

Does anyone reply to this, please ?? i am getting same problem 

Perfect365
Tourist
5 0 1

Hi @vix , can I use credit card or Stripe to checkout on Android mobile app? Or it is same with web, just one option to checkout is WebUrl?