Get checkout data now working

Hi,

I’m writing an app that interacts with the checkout.

In the extension .jsx file, I run an AJAX call passing the checkout token which I retrieved using the “useCheckoutToken()” method, and until here it works all fine.

Once the app backend tries to get the checkout data using the proper API call (https://shopify.dev/docs/api/admin-rest/2024-07/resources/checkout#get-checkouts-token) I get the following error

The REST Checkout API is deprecated. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information

Now, perhaps the API call was working, but it stopped all of a sudden, I noticed Shopify is actively dismantling the REST API for some reason, so I thought maybe they just forgot to update the documentation to say that the checkout endpoint is no longer working.

So I looked for the equivalent on the GraphQL documentation, but nothing similar for retrieving the checkout data seems to be available. Also, any GraphQL call related to the checkout requires the checkout/draft order ID, which is different from the token I can get (the token is a long alphanumeric string, while the checkout/draft order ID is just a numeric value), so even with the data I have it seems I cannot query the GraphQL for the checkout/draft orders.

Any suggestions?

1 Like