# Create direct Checkout URL from my own native app/backend to Wix Store

**URL:** <https://forum.wixstudio.com/t/create-direct-checkout-url-from-my-own-native-app-backend-to-wix-store/7174>\
**Category:** Ask the community\
**Tags:** code, question, wix-stores\
**Created:** [October 8, 2021, 1:09pm UTC](https://forum.wixstudio.com/t/create-direct-checkout-url-from-my-own-native-app-backend-to-wix-store/7174 "2021-10-08T13:09:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tb1](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@tb1](https://forum.wixstudio.com/u/tb1)\
**Post date:** [October 8, 2021, 1:09pm UTC](https://forum.wixstudio.com/t/create-direct-checkout-url-from-my-own-native-app-backend-to-wix-store/7174/1 "2021-10-08T13:09:36Z")

</div>

Hi Wix Community!

I am trying to achieve the fairly straight forward flow of sending a user from our native app to the checkout flow of a product in our Wix Store. I would like to send the user directly to checkout, and to achieve that I need a “checkoutId” and the “cartId” to put in the URL that I send.

PREFERABLY there is just a link to a resource explaining some parts of this flow, that I am just missing (I have tried to search for it for some hours now but without luck on these last parts).

There are four parts as I see it:

1. Get or create the user’s cart (get a “cartId”)
2. Add a product to that cart
3. Get or create the checkout (get a “checkoutId”)

I have access and can write code in clients and API’s, so I am using wix-http-functions to make the Wix API and my API communicate (initiated by my API). That part feels smooth.

Dilemmas I am encountering:

Ad 1) Get or create the user’s cart (get a “cartId”)

I would like the “cartId” of the user, but I would like it without a Wix Store open in the browser when **retrieving** it – so I can create a direct link to the checkout, and open the browser at that point. So I am looking for something like getCurrentCart but with the option to pass in the user id for which I would like to collect the cart for (so I am not dependent on the active browser session).

Ad 2) Add a product to that cart

Not an issue.

Ad 3) Get or create the checkout (get a “checkoutId”)

Same as for “cartId”, but I am unsure where a “checkoutId” is even retrieved if I had an active session?

Any help would be highly appreciated.

Love,  
Thoger
