Re: Specific information (shipping and payment details) from GraphQL API Order object

Solved

Integration payment on shopify and our house system

joetreeline
Visitor
2 0 0

We will start a business that sells products and provides a storage service for post-purchase products at our company.
The post-purchase storage service cannot be registered as a product on Shopify because the price calculation logic is complicated and the amount cannot be decided beforehand.
For the convenience of the user, we want to unify the payment method, so when a product is purchased on Shopify, the payment will be made via Stripe, and we are considering the following flow.
- The user searches for a product in the Shopify store and selects a product.
- Information on the selected product is received by the our in-house system,
- Create a ‘draft order’ via the Shopify API
- Send the Stripe payment link to the user via email
- Once payment is complete, ‘mark as paid’ via API
We hope to implement this kind of integration between Shopify and our in-house system, but please let us know if there is a better way of doing this.
Also, if you have any concerns with the above approach, please let us know and give us suggestions on how to address them.

Accepted Solution (1)

CalD
Shopify Staff
140 22 36

This is an accepted solution.

Hey @joetreeline,

The Order information available from the Storefront API (docs) is much more limited than the Admin API due to its unauthenticated nature. The Admin API is a better source of the information you're interested in, but you'd need to make calls to the Admin API from a server, not the mobile app though.

Check out these Admin API Order docs: https://shopify.dev/api/admin/graphql/reference/orders/order - there's a currentTotalDiscountsSet, a transactions connection you can get payment details from, a shippingLine connection, and a fulfillment connection (which has an estimatedDeliveryAt property).

CalD | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

CalD
Shopify Staff
140 22 36

This is an accepted solution.

Hey @joetreeline,

The Order information available from the Storefront API (docs) is much more limited than the Admin API due to its unauthenticated nature. The Admin API is a better source of the information you're interested in, but you'd need to make calls to the Admin API from a server, not the mobile app though.

Check out these Admin API Order docs: https://shopify.dev/api/admin/graphql/reference/orders/order - there's a currentTotalDiscountsSet, a transactions connection you can get payment details from, a shippingLine connection, and a fulfillment connection (which has an estimatedDeliveryAt property).

CalD | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

joetreeline
Visitor
2 0 0

Thanks for confirming Cal. We will rely on the Admin API for that information.

 

Thanks

-Joe