Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How do I subscribe to a Shopify customer's itemized orders via Oauth?

How do I subscribe to a Shopify customer's itemized orders via Oauth?

tedp
Visitor
2 0 0

Hello,

 

I'm co-founder of YC-backed startup versa.org.

 

I have a use case and I'm trying to determine if the Shopify API + OAuth can help me solve it. 

 

The problem, broadly, that we're trying to solve is that b2b buyers often need receipts. Those receipts land in the buyer's email inbox, but they still need to upload / forward those receipts into their bank or expense management system, which is a minor hassle. We'd like to automatically pass through Shopify receipt data for participating merchants to participating banks / expense apps. 

 

Here's the use case:

  • A Shopify customer, Timbuk2 (maker of the laptop bags), gets a big order of bags from corporate buyer Susy, who is using them as a corporate gift. 
  • Susy uses Brex for expense management. Today, Susy needs to screenshot her Timbuk2 receipts and upload them to Brex. This is a bit annoying, and Susy is considering switching vendors to something easier to integrate with her tools. 
  • Timbuk2, recognizing this gap, wants to work with Versa (versa.org / us) to automatically sync purchases with Susy's financial stack.
  • Timbuk2 creates an account on Versa, indicates that they run their shop on Shopify, and clicks an OAuth button.
  • This OAuth button grants Versa access to Timbuk2's itemized orders. 
  • Now, when Suzy (or any other Timbuk2 customers) completes another purchase at the Timbuk2 site, the receipt from that order automatically shows up in e.g. her Brex account, alongside the card charge. 

 

My questions are:

  1. Is this possible?
  2. More specifically, can Shopify merchants grant access to their order line items (https://shopify.dev/docs/api/liquid/objects#line_item)
  3. Is there a way for Versa to subscribe to order update events, or would Versa have to poll to see if new orders came in?
Replies 3 (3)

NeilMaggy
Shopify Partner
40 2 6

Hey,

maybe I missed this but how does Suzy’s brex get the data? Via your app? 

so you need Suzy and timbuk2 to be on your app? 

tedp
Visitor
2 0 0

once our app has the data, the rest of it we handle (that's our core thing). The thing I'm confirming is that via OAuth a Shopify seller can grant access to their itemized orders

NeilMaggy
Shopify Partner
40 2 6

1) I mean yeah, OAuth can grant apps access to merchants Shopify orders.

read_all_orders 

 

2) You can read which products were ordered (line items). 3) You can also set up a webhook so when a new order is placed your app get the data. So no u dont need to poll

 

Best of luck!