Js-buy-sdk: Document webUrl property (at least)

Created on 23 May 2019  Â·  8Comments  Â·  Source: Shopify/js-buy-sdk

Is your feature request related to a problem? Please describe.
The generation of a checkout URL is so important as to be mentioned as one of the four key bullet points in this SDK's introduction at https://help.shopify.com/en/api/custom-storefronts/js-buy-sdk. Yet, there is zero mention of this feature in the actual 'full' SDK API documentation: https://shopify.github.io/js-buy-sdk/. 🤔.

Describe the solution you'd like
Documentation of:

  • The properties available on each of the resources, e.g. at least webUrl on the CheckoutResource.
  • A description of how this handoff url actually works in practice, i.e. where it takes us (Is it the standard checkout page hosted on shopify?)

If hitting the handoff url is one of the key purposes/outcomes of using this SDK it would be good to have it actually documented how that works.

Describe alternatives you've considered
Perusing the example apps, and having to backwards engineer what the end result of this SDK is... which appears to be a hand off URL. And still being generally unclear of what actually happens when you hit that url without further digging and deciphering.

Additional context
Off I go to continue digging and deciphering...

documentation

Most helpful comment

Thanks for opening this ticket! We'll keep it open until we update the documentation to reflect what generate a checkout URL for a single product or an entire cart means.

Is this equivalent (from a user perspective) to the checkout pages found on a store e.g. at https://.myshopify.com//checkouts/?

Yes, it is.

All 8 comments

I agree

A partial solution (if my deciphering is correct) would be explaining that properties of the relevant resources available can be found at the relevant graphQL node of the underlying storefront API e.g. https://help.shopify.com/en/api/custom-storefronts/storefront-api/reference/object/checkout - if this is in fact the case, and simply providing a forwarding url.

This still doesn't explain to the new and innocent what

The url pointing to the checkout accessible from the web.

will actually look like though. Is this equivalent (from a user perspective) to the checkout pages found on a store e.g. at https://<username>.myshopify.com/<some-id>/checkouts/<checkout-id>?

Thanks for opening this ticket! We'll keep it open until we update the documentation to reflect what generate a checkout URL for a single product or an entire cart means.

Is this equivalent (from a user perspective) to the checkout pages found on a store e.g. at https://.myshopify.com//checkouts/?

Yes, it is.

Yet, there is zero mention of this feature in the actual 'full' SDK API documentation: https://shopify.github.io/js-buy-sdk/.

Hey @danielrob good call out on this. We've updated the link and it now directs to the Storefront API docs (which the JS buy SDK is built off of: https://help.shopify.com/en/api/storefront-api/reference)

We also recently updated our documentation around the storefront API + JS buy SDKs but we will look to add a couple items you've specified here. Thanks!

@rebeccajfriedman: This is not resolved. @morganmccunn's comment was a comment, not a suggestion this had been resolved.

I'm going to close this ticket as we've added a brief description to the README here: https://github.com/Shopify/js-buy-sdk/pull/723

If you have any further suggestions for how the documentation can be improved, feel free to open a PR on this repo.

Great work!

Out of interest, if this is the simplest way to complete a checkout what
are the less simple options? This allusion to other ways has me wondering!

Le sam. 4 janv. 2020 à 5:44 AM, rebeccajfriedman notifications@github.com
a écrit :

Closed #674 https://github.com/Shopify/js-buy-sdk/issues/674.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Shopify/js-buy-sdk/issues/674?email_source=notifications&email_token=ABMX6VTNRBTIVIR4GDKYWBDQ35TPBA5CNFSM4HOZVYK2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVYK6CPQ#event-2920669502,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABMX6VQ6UFWBHWRC3E5UJYTQ35TPBANCNFSM4HOZVYKQ
.

Out of interest, if this is the simplest way to complete a checkout what
are the less simple options? This allusion to other ways has me wondering!

There are some use cases where you might need to build out a custom checkout flow instead of using the web checkout. There is more information here: https://help.shopify.com/en/api/storefront-api/guides/checkout-guide#completing-the-checkout

Was this page helpful?
0 / 5 - 0 ratings